summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_nht.c8
-rw-r--r--bgpd/bgp_routemap.c10
-rw-r--r--ospfd/ospf_ti_lfa.c1
-rw-r--r--zebra/if_netlink.c8
-rw-r--r--zebra/interface.c6
-rw-r--r--zebra/zebra_dplane.c30
-rw-r--r--zebra/zebra_dplane.h4
-rw-r--r--zebra/zebra_l2.c3
8 files changed, 65 insertions, 5 deletions
diff --git a/bgpd/bgp_nht.c b/bgpd/bgp_nht.c
index bbc30365c7..733dcc72a2 100644
--- a/bgpd/bgp_nht.c
+++ b/bgpd/bgp_nht.c
@@ -316,6 +316,14 @@ int bgp_find_or_add_nexthop(struct bgp *bgp_route, struct bgp *bgp_nexthop,
if (make_prefix(afi, pi, &p) < 0)
return 1;
+ /*
+ * If path is learnt from an interface based peer,
+ * set the ifindex to peer's interface index so that
+ * correct nexthop can be found in nexthop tree.
+ */
+ if (pi->peer->conf_if)
+ ifindex = pi->peer->su.sin6.sin6_scope_id;
+
if (!is_bgp_static_route && orig_prefix
&& prefix_same(&p, orig_prefix)) {
if (BGP_DEBUG(nht, NHT)) {
diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c
index 1c99495e6c..af9490f0b3 100644
--- a/bgpd/bgp_routemap.c
+++ b/bgpd/bgp_routemap.c
@@ -6163,6 +6163,7 @@ DEFPY_YANG(
char xpath_value[XPATH_MAXLEN];
as_t as_configured_value;
char replace_value[ASN_STRING_MAX_SIZE * 2];
+ int ret;
if (configured_asn_str &&
!asn_str2asn(configured_asn_str, &as_configured_value)) {
@@ -6181,7 +6182,9 @@ DEFPY_YANG(
"%s/rmap-set-action/frr-bgp-route-map:replace-as-path", xpath);
nb_cli_enqueue_change(vty, xpath_value, NB_OP_MODIFY, str);
- return nb_cli_apply_changes(vty, NULL);
+ ret = nb_cli_apply_changes(vty, NULL);
+ XFREE(MTYPE_TMP, str);
+ return ret;
}
DEFPY_YANG(
@@ -6323,6 +6326,7 @@ DEFPY_YANG(set_aspath_exclude_access_list, set_aspath_exclude_access_list_cmd,
const char *xpath =
"./set-action[action='frr-bgp-route-map:as-path-exclude']";
char xpath_value[XPATH_MAXLEN];
+ int ret;
str = argv_concat(argv, argc, 3);
@@ -6332,7 +6336,9 @@ DEFPY_YANG(set_aspath_exclude_access_list, set_aspath_exclude_access_list_cmd,
"%s/rmap-set-action/frr-bgp-route-map:exclude-as-path", xpath);
nb_cli_enqueue_change(vty, xpath_value, NB_OP_MODIFY, str);
- return nb_cli_apply_changes(vty, NULL);
+ ret = nb_cli_apply_changes(vty, NULL);
+ XFREE(MTYPE_TMP, str);
+ return ret;
}
DEFPY_YANG(no_set_aspath_exclude_access_list, no_set_aspath_exclude_access_list_cmd,
diff --git a/ospfd/ospf_ti_lfa.c b/ospfd/ospf_ti_lfa.c
index f9bc2b4dd6..d8a2613075 100644
--- a/ospfd/ospf_ti_lfa.c
+++ b/ospfd/ospf_ti_lfa.c
@@ -694,6 +694,7 @@ static void ospf_ti_lfa_generate_q_spaces(struct ospf_area *area,
__func__, &p_space->root->id, &q_space->root->id,
res_buf);
+ list_delete(&q_space->vertex_list);
XFREE(MTYPE_OSPF_Q_SPACE, q_space->p_node_info);
XFREE(MTYPE_OSPF_Q_SPACE, q_space->q_node_info);
XFREE(MTYPE_OSPF_Q_SPACE, q_space);
diff --git a/zebra/if_netlink.c b/zebra/if_netlink.c
index 8767b2622c..ca0a354afd 100644
--- a/zebra/if_netlink.c
+++ b/zebra/if_netlink.c
@@ -635,8 +635,10 @@ static int netlink_bridge_vxlan_update(struct zebra_dplane_ctx *ctx,
struct bridge_vlan_info *vinfo;
struct zebra_dplane_bridge_vlan_info bvinfo;
- if (!af_spec)
+ if (!af_spec) {
+ dplane_ctx_set_ifp_no_afspec(ctx);
return 0;
+ }
netlink_bridge_vxlan_vlan_vni_map_update(ctx, af_spec);
@@ -644,8 +646,10 @@ static int netlink_bridge_vxlan_update(struct zebra_dplane_ctx *ctx,
* only 1 access VLAN is accepted.
*/
netlink_parse_rtattr_nested(aftb, IFLA_BRIDGE_MAX, af_spec);
- if (!aftb[IFLA_BRIDGE_VLAN_INFO])
+ if (!aftb[IFLA_BRIDGE_VLAN_INFO]) {
+ dplane_ctx_set_ifp_no_bridge_vlan_info(ctx);
return 0;
+ }
vinfo = RTA_DATA(aftb[IFLA_BRIDGE_VLAN_INFO]);
bvinfo.flags = vinfo->flags;
diff --git a/zebra/interface.c b/zebra/interface.c
index 10839e2106..90787f3aa0 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -1853,9 +1853,15 @@ static void interface_bridge_vxlan_update(struct zebra_dplane_ctx *ctx,
struct zebra_if *zif = ifp->info;
const struct zebra_dplane_bridge_vlan_info *bvinfo;
+ if (dplane_ctx_get_ifp_no_afspec(ctx))
+ return;
+
if (IS_ZEBRA_VXLAN_IF_SVD(zif))
interface_bridge_vxlan_vlan_vni_map_update(ctx, ifp);
+ if (dplane_ctx_get_ifp_no_bridge_vlan_info(ctx))
+ return;
+
bvinfo = dplane_ctx_get_ifp_bridge_vlan_info(ctx);
if (!(bvinfo->flags & DPLANE_BRIDGE_VLAN_INFO_PVID))
diff --git a/zebra/zebra_dplane.c b/zebra/zebra_dplane.c
index e527d93610..7b2f643080 100644
--- a/zebra/zebra_dplane.c
+++ b/zebra/zebra_dplane.c
@@ -197,6 +197,8 @@ struct dplane_intf_info {
bool startup;
uint8_t family;
struct zebra_vxlan_vni_array *vniarray;
+ bool no_bvinfo_avail;
+ bool no_afspec_avail;
struct zebra_dplane_bridge_vlan_info bvinfo;
struct zebra_dplane_bridge_vlan_info_array *bvarray;
@@ -1355,6 +1357,34 @@ dplane_ctx_get_ifp_vxlan_vni_array(const struct zebra_dplane_ctx *ctx)
return ctx->u.intf.vniarray;
}
+void dplane_ctx_set_ifp_no_afspec(struct zebra_dplane_ctx *ctx)
+{
+ DPLANE_CTX_VALID(ctx);
+
+ ctx->u.intf.no_afspec_avail = true;
+}
+
+bool dplane_ctx_get_ifp_no_afspec(const struct zebra_dplane_ctx *ctx)
+{
+ DPLANE_CTX_VALID(ctx);
+
+ return ctx->u.intf.no_afspec_avail;
+}
+
+void dplane_ctx_set_ifp_no_bridge_vlan_info(struct zebra_dplane_ctx *ctx)
+{
+ DPLANE_CTX_VALID(ctx);
+
+ ctx->u.intf.no_bvinfo_avail = true;
+}
+
+bool dplane_ctx_get_ifp_no_bridge_vlan_info(struct zebra_dplane_ctx *ctx)
+{
+ DPLANE_CTX_VALID(ctx);
+
+ return ctx->u.intf.no_bvinfo_avail;
+}
+
void dplane_ctx_set_ifp_bridge_vlan_info(
struct zebra_dplane_ctx *ctx,
struct zebra_dplane_bridge_vlan_info *bvinfo)
diff --git a/zebra/zebra_dplane.h b/zebra/zebra_dplane.h
index 79248a4ae4..c006522e01 100644
--- a/zebra/zebra_dplane.h
+++ b/zebra/zebra_dplane.h
@@ -429,6 +429,10 @@ struct zebra_dplane_bridge_vlan_info {
uint16_t flags;
uint16_t vid;
};
+void dplane_ctx_set_ifp_no_afspec(struct zebra_dplane_ctx *ctx);
+bool dplane_ctx_get_ifp_no_afspec(const struct zebra_dplane_ctx *ctx);
+void dplane_ctx_set_ifp_no_bridge_vlan_info(struct zebra_dplane_ctx *ctx);
+bool dplane_ctx_get_ifp_no_bridge_vlan_info(struct zebra_dplane_ctx *ctx);
void dplane_ctx_set_ifp_bridge_vlan_info(
struct zebra_dplane_ctx *ctx,
struct zebra_dplane_bridge_vlan_info *bvinfo);
diff --git a/zebra/zebra_l2.c b/zebra/zebra_l2.c
index 39c1319f31..4f7a1cd4ce 100644
--- a/zebra/zebra_l2.c
+++ b/zebra/zebra_l2.c
@@ -383,7 +383,8 @@ void zebra_l2_vxlanif_update_access_vlan(struct interface *ifp,
assert(zif);
/* This would be called only in non svd case */
- assert(IS_ZEBRA_VXLAN_IF_VNI(zif));
+ if (!IS_ZEBRA_VXLAN_IF_VNI(zif))
+ return;
old_access_vlan = zif->l2info.vxl.vni_info.vni.access_vlan;
;