diff options
| author | Donald Sharp <sharpd@cumulusnetwroks.com> | 2016-07-29 21:20:19 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-12-21 20:26:04 -0500 |
| commit | c8fa5a1e4f2e34319a9bf8e9d1e98476f143742a (patch) | |
| tree | bb99b782d907f6cb878cfbef2d9e209dcc96cd44 /pimd/pim_iface.c | |
| parent | 978d48a9fe6c8ad23fa8500631c4ffac0b0c7c9c (diff) | |
pimd: Create storage for a raw socket.
Each interface needs the ability to send raw packets
at the RP. Create the data structure to do so.
Further commits will create the socket as necessary
and send the packet.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_iface.c')
| -rw-r--r-- | pimd/pim_iface.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pimd/pim_iface.c b/pimd/pim_iface.c index fae11b674a..1ffea6ab46 100644 --- a/pimd/pim_iface.c +++ b/pimd/pim_iface.c @@ -87,6 +87,7 @@ struct pim_interface *pim_if_new(struct interface *ifp, int igmp, int pim) pim_ifp->options = 0; pim_ifp->mroute_vif_index = -1; + pim_ifp->pim_raw_fd = -1; pim_ifp->igmp_default_robustness_variable = IGMP_DEFAULT_ROBUSTNESS_VARIABLE; pim_ifp->igmp_default_query_interval = IGMP_GENERAL_QUERY_INTERVAL; @@ -162,6 +163,12 @@ void pim_if_delete(struct interface *ifp) pim_ifp = ifp->info; zassert(pim_ifp); + if (pim_ifp->pim_raw_fd == -1) + { + close (pim_ifp->pim_raw_fd); + pim_ifp->pim_raw_fd = -1; + } + if (pim_ifp->igmp_join_list) { pim_if_igmp_join_del_all(ifp); } |
