diff options
-rw-r--r-- | ripd/ChangeLog | 9 | ||||
-rw-r--r-- | ripd/rip_interface.c | 11 | ||||
-rw-r--r-- | ripd/ripd.c | 2 | ||||
-rw-r--r-- | ripd/ripd.h | 2 |
4 files changed, 17 insertions, 7 deletions
diff --git a/ripd/ChangeLog b/ripd/ChangeLog index 20803338..8ab8a103 100644 --- a/ripd/ChangeLog +++ b/ripd/ChangeLog @@ -1,3 +1,12 @@ +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 + 2004-06-11 Sowmini Varadhan <sowmini.varadhan@sun.com> * ripd.c: (rip_distribute_update_all) distribute list hook diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c index 4daa5b38..cb6044ed 100644 --- a/ripd/rip_interface.c +++ b/ripd/rip_interface.c @@ -138,8 +138,7 @@ rip_interface_new () } 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 @@ rip_interface_multicast_set (int sock, struct connected *connected, 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 @@ rip_interface_multicast_set (int sock, struct connected *connected, 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; } diff --git a/ripd/ripd.c b/ripd/ripd.c index 8b76073c..af0e186d 100644 --- a/ripd/ripd.c +++ b/ripd/ripd.c @@ -1355,7 +1355,7 @@ rip_send_packet (u_char * buf, int size, struct sockaddr_in *to, #ifdef RIP_RECVMSG setsockopt_pktinfo (send_sock); #endif /* RIP_RECVMSG */ - rip_interface_multicast_set(send_sock, connected, if_is_pointopoint(ifp)); + rip_interface_multicast_set (send_sock, connected); } ret = sendto (send_sock, buf, size, 0, (struct sockaddr *)&sin, diff --git a/ripd/ripd.h b/ripd/ripd.h index 5c50c576..0334888b 100644 --- a/ripd/ripd.h +++ b/ripd/ripd.h @@ -395,7 +395,7 @@ void rip_redistribute_delete (int, int, struct prefix_ipv4 *, unsigned int); void rip_redistribute_withdraw (int); void rip_zebra_ipv4_add (struct prefix_ipv4 *, struct in_addr *, u_int32_t, u_char); void rip_zebra_ipv4_delete (struct prefix_ipv4 *, struct in_addr *, u_int32_t); -void rip_interface_multicast_set (int, struct connected *, int); +void rip_interface_multicast_set (int, struct connected *); void rip_distribute_update_interface (struct interface *); void rip_if_rmap_update_interface (struct interface *); |