summaryrefslogtreecommitdiff
path: root/proto/radv
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2014-05-18 11:42:26 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2014-05-18 11:42:26 +0200
commit05476c4d04a24bdb26fa64e05ab31bc36118f34e (patch)
treee775f059cfb4bb027c444bb53eb9356e643082c8 /proto/radv
parent1149aa977d906a6400f998d5f6600871584395d0 (diff)
IPv4/IPv6 integrated socket code.
Diffstat (limited to 'proto/radv')
-rw-r--r--proto/radv/packets.c5
1 files changed, 3 insertions, 2 deletions
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;
}