From 05476c4d04a24bdb26fa64e05ab31bc36118f34e Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Sun, 18 May 2014 11:42:26 +0200 Subject: IPv4/IPv6 integrated socket code. --- proto/radv/packets.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'proto/radv') diff --git a/proto/radv/packets.c b/proto/radv/packets.c index 997fda3d..1d7e04f4 100644 --- a/proto/radv/packets.c +++ b/proto/radv/packets.c @@ -416,11 +416,11 @@ radv_sk_open(struct radv_iface *ifa) sk->data = ifa; sk->flags = SKF_LADDR_RX; - if (sk_open(sk) != 0) + if (sk_open(sk) < 0) goto err; /* We want listen just to ICMPv6 messages of type RS and RA */ - if (sk_set_icmp_filter(sk, ICMPV6_RS, ICMPV6_RA) < 0) + if (sk_set_icmp6_filter(sk, ICMPV6_RS, ICMPV6_RA) < 0) goto err; if (sk_setup_multicast(sk) < 0) @@ -433,6 +433,7 @@ radv_sk_open(struct radv_iface *ifa) return 1; err: + sk_log_error(sk, ifa->ra->p.name); rfree(sk); return 0; } -- cgit v1.2.3