diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2017-02-07 15:52:52 +0100 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2017-02-07 15:52:52 +0100 |
commit | f6864de1ab4251eeaae4657da341b2d423785fc1 (patch) | |
tree | a18df33470896ab1f8a640ee686c6aa9029d21ba /pimd/pim_sock.c | |
parent | Merge branch 'frr/pull/166' ("bgpd: fix array oob ...") (diff) | |
parent | pimd: Refactor pim_sock_open to just need the ifp pointer (diff) | |
download | frr-f6864de1ab4251eeaae4657da341b2d423785fc1.tar.xz frr-f6864de1ab4251eeaae4657da341b2d423785fc1.zip |
Merge branch 'frr/pull/165' ("Pim vrf")
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'pimd/pim_sock.c')
-rw-r--r-- | pimd/pim_sock.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/pimd/pim_sock.c b/pimd/pim_sock.c index df0095d29..7f62a1e9d 100644 --- a/pimd/pim_sock.c +++ b/pimd/pim_sock.c @@ -111,7 +111,7 @@ pim_socket_bind (int fd, struct interface *ifp) return ret; } -int pim_socket_mcast(int protocol, struct in_addr ifaddr, int ifindex, u_char loop) +int pim_socket_mcast(int protocol, struct in_addr ifaddr, struct interface *ifp, u_char loop) { int rcvbuf = 1024 * 1024 * 8; #ifdef HAVE_STRUCT_IP_MREQN_IMR_IFINDEX @@ -132,9 +132,6 @@ int pim_socket_mcast(int protocol, struct in_addr ifaddr, int ifindex, u_char lo if (protocol == IPPROTO_PIM) { int ret; - struct interface *ifp = NULL; - - ifp = if_lookup_by_index_vrf (ifindex, VRF_DEFAULT); ret = pim_socket_bind (fd, ifp); if (ret) @@ -223,7 +220,7 @@ int pim_socket_mcast(int protocol, struct in_addr ifaddr, int ifindex, u_char lo memset (&mreq, 0, sizeof (mreq)); #ifdef HAVE_STRUCT_IP_MREQN_IMR_IFINDEX - mreq.imr_ifindex = ifindex; + mreq.imr_ifindex = ifp->ifindex; #else /* * I am not sure what to do here yet for *BSD |