summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--zebra/rt_netlink.c9
-rw-r--r--zebra/zebra_nhg.c3
-rw-r--r--zebra/zebra_vxlan.c14
3 files changed, 16 insertions, 10 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index 640802fe3..915ad1a10 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -2246,6 +2246,7 @@ static struct nexthop netlink_nexthop_process_nh(struct rtattr **tb,
enum nexthop_types_t type = 0;
int if_index = 0;
size_t sz = 0;
+ struct interface *ifp_lookup;
if_index = *(int *)RTA_DATA(tb[NHA_OIF]);
@@ -2280,9 +2281,13 @@ static struct nexthop netlink_nexthop_process_nh(struct rtattr **tb,
if (if_index)
nh.ifindex = if_index;
- *ifp = if_lookup_by_index_per_ns(zebra_ns_lookup(ns_id), nh.ifindex);
+ ifp_lookup =
+ if_lookup_by_index_per_ns(zebra_ns_lookup(ns_id), nh.ifindex);
+
if (ifp)
- nh.vrf_id = (*ifp)->vrf_id;
+ *ifp = ifp_lookup;
+ if (ifp_lookup)
+ nh.vrf_id = ifp_lookup->vrf_id;
else {
flog_warn(
EC_ZEBRA_UNKNOWN_INTERFACE,
diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c
index 2bb117b27..05da25b2b 100644
--- a/zebra/zebra_nhg.c
+++ b/zebra/zebra_nhg.c
@@ -886,8 +886,7 @@ static void nhg_ctx_process_finish(struct nhg_ctx *ctx)
nexthop_del_labels(nh);
done:
- if (ctx)
- nhg_ctx_free(ctx);
+ nhg_ctx_free(ctx);
}
static int queue_add(struct nhg_ctx *ctx)
diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c
index 2417b505a..1d2748c8e 100644
--- a/zebra/zebra_vxlan.c
+++ b/zebra/zebra_vxlan.c
@@ -5775,12 +5775,14 @@ static void process_remote_macip_del(vni_t vni,
vlan_if = zvni_map_to_svi(vxl->access_vlan,
zif->brslave_info.br_if);
if (IS_ZEBRA_DEBUG_VXLAN)
- zlog_debug("%s: IP %s (flags 0x%x intf %s) is remote and duplicate, read kernel for local entry",
- __PRETTY_FUNCTION__,
- ipaddr2str(ipaddr, buf1,
- sizeof(buf1)), n->flags,
- vlan_if->name);
- neigh_read_specific_ip(ipaddr, vlan_if);
+ zlog_debug(
+ "%s: IP %s (flags 0x%x intf %s) is remote and duplicate, read kernel for local entry",
+ __PRETTY_FUNCTION__,
+ ipaddr2str(ipaddr, buf1, sizeof(buf1)),
+ n->flags,
+ vlan_if ? vlan_if->name : "Unknown");
+ if (vlan_if)
+ neigh_read_specific_ip(ipaddr, vlan_if);
}
/* When the MAC changes for an IP, it is possible the