diff options
author | Pat Ruddy <pat@voltanet.io> | 2020-06-03 13:22:26 +0200 |
---|---|---|
committer | Anuradha Karuppiah <anuradhak@cumulusnetworks.com> | 2020-08-05 15:46:12 +0200 |
commit | bd23c840368045ea8251898a21fe4eb015115190 (patch) | |
tree | a6f69a52c7e3ae43256bba040f5d4e0e7f0dda77 /zebra/zebra_l2.c | |
parent | Merge pull request #6860 from opensourcerouting/bgp-docs-missing (diff) | |
download | frr-bd23c840368045ea8251898a21fe4eb015115190.tar.xz frr-bd23c840368045ea8251898a21fe4eb015115190.zip |
evpn-netns: Revert PR5077, has been re-worked post-refactor
Revert "zebra: support for macvlan interfaces"
This reverts commit bf69e212fd053af3298fc3cba38458b396467849.
Revert "doc: add some documentation about bgp evpn netns support"
This reverts commit 89b97c33d7a6d9dc427d56fea52fa27334dde81d.
Revert "zebra: dynamically detect vxlan link interfaces in other netns"
This reverts commit de0ebb25404fe984f084a0d57b7f873618423876.
Revert "bgpd: sanity check when updating nexthop from bgp to zebra"
This reverts commit ee9633ed87f0ff5da1373a42d6c044f0a682c8d3.
Revert "lib, zebra: reuse and adapt ns_list walk functionality"
This reverts commit c4d466c830083e8ba58881d7ad03a90f6baf0754.
Revert "zebra: local mac entries populated in correct netnamespace"
This reverts commit 40424548910887f3bbbf544ce964d3b736048ae5.
Revert "zebra: when parsing local entry against dad, retrieve config"
This reverts commit 3acc394bc5e5c225e9258fd0d57a6cebea0c0ccd.
Revert "bgpd: evpn nexthop can be changed by default"
This reverts commit a2342a241253c41b798845cae155b4caab4bcda5.
Revert "zebra: zvni_map_to_vlan() adaptation for all namespaces"
This reverts commit db81d18647bbd81a2c335620c9a03e32e4a5b2be.
Revert "zebra: add ns_id attribute to mac structure"
This reverts commit 388d5b438e22cddc6740e362763c0922edbb242a.
Revert "zebra: bridge layer2 information records ns_id where bridge is"
This reverts commit b5b453a2d6af58692bee0e256fe1dffe99824801.
Revert "zebra, lib: new API to get absolute netns val from relative netns val"
This reverts commit b6ebab34f664ba1cc9479fc1287f127c12077509.
Revert "zebra, lib: store relative default ns id in each namespace"
This reverts commit 9d3555e06ccc68fe37e0a00100029ac4bad8dee2.
Revert "zebra, lib: add an internal API to get relative default nsid in other ns"
This reverts commit 97c9e7533bd22029ac19838c043cfca82d2f6eb3.
Revert "zebra: map vxlan interface to bridge interface with correct ns id"
This reverts commit 7c990878f20efff335c1211deda3ec50071ae2b5.
Revert "zebra: fdb and neighbor table are read for all zns"
This reverts commit f8ed2c5420106314a940cb67264494e0110fc4c0.
Revert "zebra: zvni_map_to_svi() adaptation for other network namespaces"
This reverts commit 2a9dccb6475bfc11af2b855c4c8ff9e500ba21f4.
Revert "zebra: display interface slave type"
This reverts commit fc3141393ad95651d31fccd144b5c029d00e5f3a.
Revert "zebra: zvni_from_svi() adaptation for other network namespaces"
This reverts commit 6fe516bd4b85569b3b8b4bcc2910afc5569aa026.
Revert "zebra: importation of bgp evpn rt5 from vni with other netns"
This reverts commit 28254125d06f65cc4344b6156eec76a37ec6aede.
Revert "lib, zebra: update interface name at netlink creation"
This reverts commit 1f7a68a2ff0ba1424131f30112e0cc1572f0bee3.
Signed-off-by: Pat Ruddy <pat@voltanet.io>
Diffstat (limited to 'zebra/zebra_l2.c')
-rw-r--r-- | zebra/zebra_l2.c | 34 |
1 files changed, 8 insertions, 26 deletions
diff --git a/zebra/zebra_l2.c b/zebra/zebra_l2.c index 4c0cc62fb..e549d80a5 100644 --- a/zebra/zebra_l2.c +++ b/zebra/zebra_l2.c @@ -53,13 +53,7 @@ static void map_slaves_to_bridge(struct interface *br_if, int link) { struct vrf *vrf; struct interface *ifp; - struct zebra_vrf *zvrf; - struct zebra_ns *zns; - zvrf = zebra_vrf_lookup_by_id(br_if->vrf_id); - assert(zvrf); - zns = zvrf->zns; - assert(zns); RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) { FOR_ALL_INTERFACES (vrf, ifp) { struct zebra_if *zif; @@ -78,8 +72,7 @@ static void map_slaves_to_bridge(struct interface *br_if, int link) br_slave = &zif->brslave_info; if (link) { - if (br_slave->bridge_ifindex == br_if->ifindex && - br_slave->ns_id == zns->ns_id) + if (br_slave->bridge_ifindex == br_if->ifindex) br_slave->br_if = br_if; } else { if (br_slave->br_if == br_if) @@ -90,14 +83,12 @@ static void map_slaves_to_bridge(struct interface *br_if, int link) } /* Public functions */ -void zebra_l2_map_slave_to_bridge(struct zebra_l2info_brslave *br_slave, - struct zebra_ns *zns) +void zebra_l2_map_slave_to_bridge(struct zebra_l2info_brslave *br_slave) { struct interface *br_if; /* TODO: Handle change of master */ - assert(zns); - br_if = if_lookup_by_index_per_ns(zebra_ns_lookup(zns->ns_id), + br_if = if_lookup_by_index_per_ns(zebra_ns_lookup(NS_DEFAULT), br_slave->bridge_ifindex); if (br_if) br_slave->br_if = br_if; @@ -119,7 +110,7 @@ void zebra_l2_map_slave_to_bond(struct zebra_l2info_bondslave *bond_slave, bond_slave->bond_if = bond_if; else bond_slave->bond_if = if_create_ifindex(bond_slave->bond_ifindex, - vrf_id, NULL); + vrf_id); } void zebra_l2_unmap_slave_from_bond(struct zebra_l2info_bondslave *bond_slave) @@ -246,32 +237,23 @@ void zebra_l2_vxlanif_del(struct interface *ifp) * from a bridge before it can be mapped to another bridge. */ void zebra_l2if_update_bridge_slave(struct interface *ifp, - ifindex_t bridge_ifindex, - ns_id_t ns_id) + ifindex_t bridge_ifindex) { struct zebra_if *zif; ifindex_t old_bridge_ifindex; - ns_id_t old_ns_id; - struct zebra_vrf *zvrf; zif = ifp->info; assert(zif); - zvrf = zebra_vrf_lookup_by_id(ifp->vrf_id); - if (!zvrf) - return; - old_bridge_ifindex = zif->brslave_info.bridge_ifindex; - old_ns_id = zif->brslave_info.ns_id; - if (old_bridge_ifindex == bridge_ifindex && - old_ns_id == zif->brslave_info.ns_id) + if (old_bridge_ifindex == bridge_ifindex) return; - zif->brslave_info.ns_id = ns_id; zif->brslave_info.bridge_ifindex = bridge_ifindex; + /* Set up or remove link with master */ if (bridge_ifindex != IFINDEX_INTERNAL) { - zebra_l2_map_slave_to_bridge(&zif->brslave_info, zvrf->zns); + zebra_l2_map_slave_to_bridge(&zif->brslave_info); /* In the case of VxLAN, invoke the handler for EVPN. */ if (zif->zif_type == ZEBRA_IF_VXLAN) zebra_vxlan_if_update(ifp, ZEBRA_VXLIF_MASTER_CHANGE); |