diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2016-11-12 19:05:08 -0200 |
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2016-11-25 11:46:06 -0200 |
| commit | c5bdb09fd9d18ac0524a14c90f79cfad95afefd7 (patch) | |
| tree | a74b32bb6d4df5fc1075b4d71fe39fc55e2538d4 /ldpd/socket.c | |
| parent | 5736139d4a9192c9ba296d2bddc5bbbd025dfd7f (diff) | |
*: create a helper function to set the IP_MULTICAST_LOOP sockoption
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ldpd/socket.c')
| -rw-r--r-- | ldpd/socket.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/ldpd/socket.c b/ldpd/socket.c index cf352d7204..1bb0837401 100644 --- a/ldpd/socket.c +++ b/ldpd/socket.c @@ -421,15 +421,7 @@ sock_set_ipv4_mcast(struct iface *iface) int sock_set_ipv4_mcast_loop(int fd) { - uint8_t loop = 0; - - if (setsockopt(fd, IPPROTO_IP, IP_MULTICAST_LOOP, - (char *)&loop, sizeof(loop)) < 0) { - log_warn("%s: error setting IP_MULTICAST_LOOP", __func__); - return (-1); - } - - return (0); + return (setsockopt_ipv4_multicast_loop(fd, 0)); } int |
