]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Set scope_id correctly.
authorRoy Marples <roy@marples.name>
Thu, 16 May 2013 16:29:54 +0000 (16:29 +0000)
committerRoy Marples <roy@marples.name>
Thu, 16 May 2013 16:29:54 +0000 (16:29 +0000)
ipv6.h
ipv6ns.c
ipv6rs.c

diff --git a/ipv6.h b/ipv6.h
index d730c78a14a6aa1a3a3b28f67bedc004046ff9f9..1c0191941461020a95bceff3bc83a09ba9063707 100644 (file)
--- a/ipv6.h
+++ b/ipv6.h
@@ -28,6 +28,7 @@
 #ifndef IPV6_H
 #define IPV6_H
 
+#include <sys/param.h>
 #include <sys/queue.h>
 
 #include <netinet/in.h>
index 3221b1588b12f4499407a2a92c31ec35b8e05f59..5a182f82bd6af35622b096dbe9fe1f5d776c5382 100644 (file)
--- a/ipv6ns.c
+++ b/ipv6ns.c
@@ -298,7 +298,7 @@ ipv6ns_probeaddr(void *arg)
        dst.sin6_addr.s6_addr[12] = 0xff;
 
        //memcpy(&dst.sin6_addr, &ap->addr, sizeof(dst.sin6_addr));
-       //dst.sin6_scope_id = ap->iface->index;
+       dst.sin6_scope_id = ap->iface->index;
 
        sndhdr.msg_name = (caddr_t)&dst;
        sndhdr.msg_iov[0].iov_base = ap->ns;
@@ -422,7 +422,7 @@ ipv6ns_proberouter(void *arg)
        dst.sin6_len = sizeof(dst);
 #endif
        memcpy(&dst.sin6_addr, &rap->from, sizeof(dst.sin6_addr));
-       //dst.sin6_scope_id = rap->iface->index;
+       dst.sin6_scope_id = rap->iface->index;
 
        sndhdr.msg_name = (caddr_t)&dst;
        sndhdr.msg_iov[0].iov_base = rap->ns;
index 4dd37b3610b8c81946f0eb0f406407a7f0542950..ca69fe2adfab77520df1a69b56f0155d43d0506c 100644 (file)
--- a/ipv6rs.c
+++ b/ipv6rs.c
@@ -233,7 +233,7 @@ ipv6rs_sendprobe(void *arg)
        int hoplimit = HOPLIMIT;
 
        dst = allrouters;
-       //dst.sin6_scope_id = ifp->linkid;
+       dst.sin6_scope_id = ifp->index;
 
        state = RS_STATE(ifp);
        sndhdr.msg_name = (caddr_t)&dst;