diff options
| author | Anuradha Karuppiah <anuradhak@cumulusnetworks.com> | 2019-03-22 09:48:17 -0700 |
|---|---|---|
| committer | Anuradha Karuppiah <anuradhak@cumulusnetworks.com> | 2019-04-20 08:33:21 -0700 |
| commit | b1891fa08459de0cf1f7672b5600d8bf798eb0ab (patch) | |
| tree | 0dd8239af9829f0dfea8b82f5d68bb70e59ef2e1 /pimd/pim_iface.c | |
| parent | ee31c9fd1a0e58bfe42909817c3140a564bb9b74 (diff) | |
pimd: API for enabling pim on the vxlan term device ipmr-lo
ipmr-lo is a dummy netdev with no additional addressing requirements -
root@TORS1:~# ip -d link show ipmr-lo
28: ipmr-lo: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default
link/ether 12:5a:ae:74:51:a2 brd ff:ff:ff:ff:ff:ff promiscuity 0
dummy addrgenmode eui64
root@TORS1:~#
This device is used by pim-vxlan to signify multicast-vxlan-tunnel
termination.
Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_iface.c')
| -rw-r--r-- | pimd/pim_iface.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/pimd/pim_iface.c b/pimd/pim_iface.c index 92d21cf429..a7b5511f35 100644 --- a/pimd/pim_iface.c +++ b/pimd/pim_iface.c @@ -109,7 +109,7 @@ static int pim_sec_addr_comp(const void *p1, const void *p2) } struct pim_interface *pim_if_new(struct interface *ifp, bool igmp, bool pim, - bool ispimreg) + bool ispimreg, bool is_vxlan_term) { struct pim_interface *pim_ifp; @@ -178,7 +178,7 @@ struct pim_interface *pim_if_new(struct interface *ifp, bool igmp, bool pim, pim_sock_reset(ifp); - pim_if_add_vif(ifp, ispimreg); + pim_if_add_vif(ifp, ispimreg, is_vxlan_term); return pim_ifp; } @@ -628,7 +628,7 @@ void pim_if_addr_add(struct connected *ifc) address assigned, then try to create a vif_index. */ if (pim_ifp->mroute_vif_index < 0) { - pim_if_add_vif(ifp, false); + pim_if_add_vif(ifp, false, false /*vxlan_term*/); } pim_ifchannel_scan_forward_start(ifp); } @@ -761,7 +761,7 @@ void pim_if_addr_add_all(struct interface *ifp) * address assigned, then try to create a vif_index. */ if (pim_ifp->mroute_vif_index < 0) { - pim_if_add_vif(ifp, false); + pim_if_add_vif(ifp, false, false /*vxlan_term*/); } pim_ifchannel_scan_forward_start(ifp); @@ -926,7 +926,7 @@ static int pim_iface_next_vif_index(struct interface *ifp) see also pim_if_find_vifindex_by_ifindex() */ -int pim_if_add_vif(struct interface *ifp, bool ispimreg) +int pim_if_add_vif(struct interface *ifp, bool ispimreg, bool is_vxlan_term) { struct pim_interface *pim_ifp = ifp->info; struct in_addr ifaddr; @@ -948,7 +948,7 @@ int pim_if_add_vif(struct interface *ifp, bool ispimreg) } ifaddr = pim_ifp->primary_address; - if (!ispimreg && PIM_INADDR_IS_ANY(ifaddr)) { + if (!ispimreg && !is_vxlan_term && PIM_INADDR_IS_ANY(ifaddr)) { zlog_warn( "%s: could not get address for interface %s ifindex=%d", __PRETTY_FUNCTION__, ifp->name, ifp->ifindex); @@ -1469,7 +1469,8 @@ void pim_if_create_pimreg(struct pim_instance *pim) pim->regiface = if_create(pimreg_name, pim->vrf_id); pim->regiface->ifindex = PIM_OIF_PIM_REGISTER_VIF; - pim_if_new(pim->regiface, false, false, true); + pim_if_new(pim->regiface, false, false, true, + false /*vxlan_term*/); } } |
