diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2016-11-12 22:05:08 +0100 |
---|---|---|
committer | Renato Westphal <renato@opensourcerouting.org> | 2016-11-25 14:46:06 +0100 |
commit | c5bdb09fd9d18ac0524a14c90f79cfad95afefd7 (patch) | |
tree | a74b32bb6d4df5fc1075b4d71fe39fc55e2538d4 /zebra/irdp_packet.c | |
parent | pimd/zebra: fix setting of IP_MULTICAST_LOOP on OpenBSD (diff) | |
download | frr-c5bdb09fd9d18ac0524a14c90f79cfad95afefd7.tar.xz frr-c5bdb09fd9d18ac0524a14c90f79cfad95afefd7.zip |
*: create a helper function to set the IP_MULTICAST_LOOP sockoption
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'zebra/irdp_packet.c')
-rw-r--r-- | zebra/irdp_packet.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/zebra/irdp_packet.c b/zebra/irdp_packet.c index 290a6180e..c9c32ce31 100644 --- a/zebra/irdp_packet.c +++ b/zebra/irdp_packet.c @@ -323,12 +323,8 @@ send_packet(struct interface *ifp, zlog_warn("sendto %s", safe_strerror (errno)); } - if(dst != INADDR_BROADCAST) { - on = 0; - if( setsockopt(irdp_sock,IPPROTO_IP, IP_MULTICAST_LOOP, - (char *)&on,sizeof(on)) < 0) - zlog_warn("sendto %s", safe_strerror (errno)); - } + if(dst != INADDR_BROADCAST) + setsockopt_ipv4_multicast_loop (irdp_sock, 0); memset(&sockdst,0,sizeof(sockdst)); sockdst.sin_family=AF_INET; |