summaryrefslogtreecommitdiff
path: root/proto/radv
diff options
context:
space:
mode:
Diffstat (limited to 'proto/radv')
-rw-r--r--proto/radv/packets.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/proto/radv/packets.c b/proto/radv/packets.c
index 38abaa4c..997fda3d 100644
--- a/proto/radv/packets.c
+++ b/proto/radv/packets.c
@@ -404,7 +404,7 @@ radv_sk_open(struct radv_iface *ifa)
sock *sk = sk_new(ifa->ra->p.pool);
sk->type = SK_IP;
sk->dport = ICMPV6_PROTO;
- sk->saddr = IPA_NONE;
+ sk->saddr = ifa->addr->ip;
sk->ttl = 255; /* Mandatory for Neighbor Discovery packets */
sk->rx_hook = radv_rx_hook;
@@ -419,8 +419,6 @@ radv_sk_open(struct radv_iface *ifa)
if (sk_open(sk) != 0)
goto err;
- sk->saddr = ifa->addr->ip;
-
/* We want listen just to ICMPv6 messages of type RS and RA */
if (sk_set_icmp_filter(sk, ICMPV6_RS, ICMPV6_RA) < 0)
goto err;