summaryrefslogtreecommitdiffstats
path: root/pimd
diff options
context:
space:
mode:
authorAnuradha Karuppiah <anuradhak@cumulusnetworks.com>2019-03-22 17:48:17 +0100
committerAnuradha Karuppiah <anuradhak@cumulusnetworks.com>2019-04-20 17:33:21 +0200
commitb1891fa08459de0cf1f7672b5600d8bf798eb0ab (patch)
tree0dd8239af9829f0dfea8b82f5d68bb70e59ef2e1 /pimd
parentpimd: add new OIF type in prep for vxlan support (diff)
downloadfrr-b1891fa08459de0cf1f7672b5600d8bf798eb0ab.tar.xz
frr-b1891fa08459de0cf1f7672b5600d8bf798eb0ab.zip
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')
-rw-r--r--pimd/pim_cmd.c6
-rw-r--r--pimd/pim_iface.c15
-rw-r--r--pimd/pim_iface.h4
-rw-r--r--pimd/pim_zebra.c3
4 files changed, 16 insertions, 12 deletions
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c
index 5f944e10c..4305cf78f 100644
--- a/pimd/pim_cmd.c
+++ b/pimd/pim_cmd.c
@@ -5788,7 +5788,8 @@ static int pim_cmd_igmp_start(struct vty *vty, struct interface *ifp)
pim_ifp = ifp->info;
if (!pim_ifp) {
- pim_ifp = pim_if_new(ifp, true, false, false);
+ pim_ifp = pim_if_new(ifp, true, false, false,
+ false /*vxlan_term*/);
if (!pim_ifp) {
vty_out(vty, "Could not enable IGMP on interface %s\n",
ifp->name);
@@ -6399,7 +6400,8 @@ static int pim_cmd_interface_add(struct interface *ifp)
struct pim_interface *pim_ifp = ifp->info;
if (!pim_ifp) {
- pim_ifp = pim_if_new(ifp, false, true, false);
+ pim_ifp = pim_if_new(ifp, false, true, false,
+ false /*vxlan_term*/);
if (!pim_ifp) {
return 0;
}
diff --git a/pimd/pim_iface.c b/pimd/pim_iface.c
index 92d21cf42..a7b5511f3 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*/);
}
}
diff --git a/pimd/pim_iface.h b/pimd/pim_iface.h
index 5066998cb..fe96c0775 100644
--- a/pimd/pim_iface.h
+++ b/pimd/pim_iface.h
@@ -158,7 +158,7 @@ void pim_if_init(struct pim_instance *pim);
void pim_if_terminate(struct pim_instance *pim);
struct pim_interface *pim_if_new(struct interface *ifp, bool igmp, bool pim,
- bool ispimreg);
+ bool ispimreg, bool is_vxlan_term);
void pim_if_delete(struct interface *ifp);
void pim_if_addr_add(struct connected *ifc);
void pim_if_addr_del(struct connected *ifc, int force_prim_as_any);
@@ -167,7 +167,7 @@ void pim_if_addr_del_all(struct interface *ifp);
void pim_if_addr_del_all_igmp(struct interface *ifp);
void pim_if_addr_del_all_pim(struct interface *ifp);
-int pim_if_add_vif(struct interface *ifp, bool ispimreg);
+int pim_if_add_vif(struct interface *ifp, bool ispimreg, bool is_vxlan_term);
int pim_if_del_vif(struct interface *ifp);
void pim_if_add_vif_all(struct pim_instance *pim);
void pim_if_del_vif_all(struct pim_instance *pim);
diff --git a/pimd/pim_zebra.c b/pimd/pim_zebra.c
index 552bda2e7..d48c5a143 100644
--- a/pimd/pim_zebra.c
+++ b/pimd/pim_zebra.c
@@ -111,7 +111,8 @@ static int pim_zebra_if_add(int command, struct zclient *zclient,
struct pim_interface *pim_ifp;
if (!ifp->info) {
- pim_ifp = pim_if_new(ifp, false, false, false);
+ pim_ifp = pim_if_new(ifp, false, false, false,
+ false /*vxlan_term*/);
ifp->info = pim_ifp;
}