diff options
| -rw-r--r-- | bgpd/bgp_route.c | 20 | ||||
| -rw-r--r-- | zebra/if_netlink.c | 18 |
2 files changed, 33 insertions, 5 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 23e6195d34..801ea1a2a1 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -1213,9 +1213,18 @@ static int bgp_path_info_cmp(struct bgp *bgp, struct bgp_path_info *new, /* If one path has a label but the other does not, do not treat * them as equals for multipath */ - if ((new->extra &&bgp_is_valid_label(&new->extra->label[0])) - != (exist->extra - && bgp_is_valid_label(&exist->extra->label[0]))) { + int newl, existl; + + newl = existl = 0; + + if (new->extra) + newl = new->extra->num_labels; + if (exist->extra) + existl = exist->extra->num_labels; + if (((new->extra &&bgp_is_valid_label(&new->extra->label[0])) != + (exist->extra && + bgp_is_valid_label(&exist->extra->label[0]))) || + (newl != existl)) { if (debug) zlog_debug( "%s: %s and %s cannot be multipath, one has a label while the other does not", @@ -2658,9 +2667,12 @@ void bgp_best_selection(struct bgp *bgp, struct bgp_dest *dest, continue; if (BGP_PATH_HOLDDOWN(pi1)) continue; - if (pi1->peer != bgp->peer_self) + if (pi1->peer != bgp->peer_self && + !CHECK_FLAG(pi1->peer->sflags, + PEER_STATUS_NSF_WAIT)) { if (!peer_established(pi1->peer)) continue; + } new_select = pi1; if (pi1->next) { diff --git a/zebra/if_netlink.c b/zebra/if_netlink.c index 6e5fef3b3f..823785ce1a 100644 --- a/zebra/if_netlink.c +++ b/zebra/if_netlink.c @@ -2164,7 +2164,15 @@ int netlink_link_change(struct nlmsghdr *h, ns_id_t ns_id, int startup) if (tb[IFLA_PROTO_DOWN]) netlink_proc_dplane_if_protodown(ifp->info, tb); - + if (IS_ZEBRA_IF_BRIDGE(ifp)) { + zif = ifp->info; + if (IS_ZEBRA_DEBUG_KERNEL) + zlog_debug( + "RTM_NEWLINK ADD for %s(%u), vlan-aware %d", + name, ifp->ifindex, + IS_ZEBRA_IF_BRIDGE_VLAN_AWARE( + zif)); + } } else if (ifp->vrf->vrf_id != vrf_id) { /* VRF change for an interface. */ if (IS_ZEBRA_DEBUG_KERNEL) @@ -2300,6 +2308,14 @@ int netlink_link_change(struct nlmsghdr *h, ns_id_t ns_id, int startup) else if (IS_ZEBRA_IF_BOND_SLAVE(ifp) || was_bond_slave) zebra_l2if_update_bond_slave(ifp, bond_ifindex, !!bypass); + if (IS_ZEBRA_IF_BRIDGE(ifp)) { + if (IS_ZEBRA_DEBUG_KERNEL) + zlog_debug( + "RTM_NEWLINK update for %s(%u), vlan-aware %d", + name, ifp->ifindex, + IS_ZEBRA_IF_BRIDGE_VLAN_AWARE( + zif)); + } } zif = ifp->info; |
