diff options
| -rw-r--r-- | bgpd/bgpd.c | 3 | ||||
| -rw-r--r-- | ospf6d/ospf6_flood.c | 15 | ||||
| -rw-r--r-- | tests/topotests/all_protocol_startup/test_all_protocol_startup.py | 2 | ||||
| -rw-r--r-- | zebra/if_netlink.c | 25 |
4 files changed, 30 insertions, 15 deletions
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 925af80cb7..57083440b1 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -7883,8 +7883,7 @@ struct peer *peer_lookup_in_view(struct vty *vty, struct bgp *bgp, json_no, JSON_C_TO_STRING_PRETTY)); json_object_free(json_no); } else - vty_out(vty, "No such neighbor in %s\n", - bgp->name_pretty); + vty_out(vty, "No such neighbor in this view/vrf\n"); return NULL; } diff --git a/ospf6d/ospf6_flood.c b/ospf6d/ospf6_flood.c index 3a242575cd..ade008c492 100644 --- a/ospf6d/ospf6_flood.c +++ b/ospf6d/ospf6_flood.c @@ -1027,15 +1027,8 @@ void ospf6_receive_lsa(struct ospf6_neighbor *from, if (old) ospf6_flood_clear(old); - /* (b) immediately flood and (c) remove from all retrans-list */ - /* Prevent self-originated LSA to be flooded. this is to make - reoriginated instance of the LSA not to be rejected by other - routers - due to MinLSArrival. */ self_originated = (new->header->adv_router == from->ospf6_if->area->ospf6->router_id); - if (!self_originated) - ospf6_flood(from, new); /* Received non-self-originated Grace LSA. */ if (IS_GRACE_LSA(new) && !self_originated) { @@ -1081,6 +1074,14 @@ void ospf6_receive_lsa(struct ospf6_neighbor *from, } } + /* (b) immediately flood and (c) remove from all retrans-list */ + /* Prevent self-originated LSA to be flooded. this is to make + * reoriginated instance of the LSA not to be rejected by other + * routers due to MinLSArrival. + */ + if (!self_originated) + ospf6_flood(from, new); + /* (d), installing lsdb, which may cause routing table calculation (replacing database copy) */ ospf6_install_lsa(new); diff --git a/tests/topotests/all_protocol_startup/test_all_protocol_startup.py b/tests/topotests/all_protocol_startup/test_all_protocol_startup.py index 1b99fcea1f..ddb7f4e16e 100644 --- a/tests/topotests/all_protocol_startup/test_all_protocol_startup.py +++ b/tests/topotests/all_protocol_startup/test_all_protocol_startup.py @@ -966,7 +966,7 @@ def test_bgp_summary(): r"(192.168.7.(1|2)0|fc00:0:0:8::2000).+Active.+", "", expected ) elif "10.0.0.1" in arguments: - expected = "No such neighbor in VRF default" + expected = "No such neighbor in this view/vrf" if "terse" in arguments: expected = re.sub(r"BGP table version .+", "", expected) diff --git a/zebra/if_netlink.c b/zebra/if_netlink.c index 28a64407e5..f1e82e93d4 100644 --- a/zebra/if_netlink.c +++ b/zebra/if_netlink.c @@ -1292,11 +1292,22 @@ int netlink_interface_addr(struct nlmsghdr *h, ns_id_t ns_id, int startup) ifp = if_lookup_by_index_per_ns(zns, ifa->ifa_index); if (ifp == NULL) { - flog_err( - EC_LIB_INTERFACE, - "netlink_interface_addr can't find interface by index %d", - ifa->ifa_index); - return -1; + if (startup) { + /* During startup, failure to lookup the referenced + * interface should not be an error, so we have + * downgraded this condition to warning, and we permit + * the startup interface state retrieval to continue. + */ + flog_warn(EC_LIB_INTERFACE, + "%s: can't find interface by index %d", + __func__, ifa->ifa_index); + return 0; + } else { + flog_err(EC_LIB_INTERFACE, + "%s: can't find interface by index %d", + __func__, ifa->ifa_index); + return -1; + } } /* Flags passed through */ @@ -1832,6 +1843,8 @@ int netlink_link_change(struct nlmsghdr *h, ns_id_t ns_id, int startup) /* Update link. */ zebra_if_update_link(ifp, link_ifindex, ns_id); + ifp->ll_type = + netlink_to_zebra_link_type(ifi->ifi_type); netlink_interface_update_hw_addr(tb, ifp); /* Inform clients, install any configured addresses. */ @@ -1899,6 +1912,8 @@ int netlink_link_change(struct nlmsghdr *h, ns_id_t ns_id, int startup) /* Update link. */ zebra_if_update_link(ifp, link_ifindex, ns_id); + ifp->ll_type = + netlink_to_zebra_link_type(ifi->ifi_type); netlink_interface_update_hw_addr(tb, ifp); if (if_is_no_ptm_operative(ifp)) { |
