2004-08-19 Paul Jakma <paul@dishone.st>
* rip_interface.c: (rip_interface_multicast_set) get rid
of extraneous if_pointopoint arg. ifp is accessible via connected.
pass connected->ifp->ifindex to setsockopt_multicast_ipv4.
* ripd.c: (rip_send_packet) update call to
rip_interface_multicast_set
* ripd.h: update rip_interface_multicast_set prototype
diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c
index 4daa5b3..cb6044e 100644
--- a/ripd/rip_interface.c
+++ b/ripd/rip_interface.c
@@ -138,8 +138,7 @@
}
void
-rip_interface_multicast_set (int sock, struct connected *connected,
- int if_pointopoint)
+rip_interface_multicast_set (int sock, struct connected *connected)
{
int ret;
struct servent *sp;
@@ -149,7 +148,7 @@
if (connected != NULL)
{
- if (if_pointopoint)
+ if (if_is_pointopoint(connected->ifp))
p = (struct prefix_ipv4 *) connected->destination;
else
p = (struct prefix_ipv4 *) connected->address;
@@ -160,9 +159,11 @@
addr.s_addr = INADDR_ANY;
}
- if (setsockopt_multicast_ipv4 (sock, IP_MULTICAST_IF, addr, 0, 0) < 0)
+ if (setsockopt_multicast_ipv4 (sock, IP_MULTICAST_IF, addr, 0,
+ connected->ifp->ifindex) < 0)
{
- zlog_warn ("Can't setsockopt IP_MULTICAST_IF to fd %d", sock);
+ zlog_warn ("Can't setsockopt IP_MULTICAST_IF to fd %d, ifindex %d",
+ sock, connected->ifp->ifindex);
return;
}