In article <20000924131934.A15731@xxxxxxxxxxxxxxxxxxxxxxx> (at Sun, 24 Sep 2000
13:19:34 +0200), Arkadiusz Miskiewicz <misiek@xxxxxxxxxx> says:
> Draft scopedaddr-format says that quering getaddrinfo() with
> only link-local address (without scope id/interface name) is ok
> so I assume that connect()tion to link local address
> (with sin6_scope_id = 0) should be ok for kernel, too.
Does this help you?
Index: af_inet6.c
===================================================================
RCS file: /cvsroot/usagi/kernel/linux24/net/ipv6/af_inet6.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- af_inet6.c 2000/08/25 02:29:26 1.1
+++ af_inet6.c 2000/09/24 12:36:38 1.2
@@ -269,11 +269,13 @@
sk->bound_dev_if = addr->sin6_scope_id;
}
+#ifndef CONFIG_IPV6_LOOSE_SCOPE_ID
/* Binding to link-local address requires an interface */
if (sk->bound_dev_if == 0) {
release_sock(sk);
return -EINVAL;
}
+#endif
}
sk->rcv_saddr = v4addr;
Index: tcp_ipv6.c
===================================================================
RCS file: /cvsroot/usagi/kernel/linux24/net/ipv6/tcp_ipv6.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- tcp_ipv6.c 2000/08/25 02:29:26 1.1
+++ tcp_ipv6.c 2000/09/24 12:36:38 1.2
@@ -561,9 +561,11 @@
sk->bound_dev_if = usin->sin6_scope_id;
}
+#ifndef CONFIG_IPV6_LOOSE_SCOPE_ID
/* Connect to link-local address requires an interface */
if (sk->bound_dev_if == 0)
return -EINVAL;
+#endif
}
if (tp->ts_recent_stamp && ipv6_addr_cmp(&np->daddr, &usin->sin6_addr))
{
Index: udp.c
===================================================================
RCS file: /cvsroot/usagi/kernel/linux24/net/ipv6/udp.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- udp.c 2000/08/25 02:29:26 1.1
+++ udp.c 2000/09/24 12:36:38 1.2
@@ -291,9 +291,11 @@
sk->bound_dev_if = usin->sin6_scope_id;
}
+#ifndef CONFIG_IPV6_LOOSE_SCOPE_ID
/* Connect to link-local address requires an interface */
if (sk->bound_dev_if == 0)
return -EINVAL;
+#endif
}
ipv6_addr_copy(&np->daddr, daddr);
--
Hideaki YOSHIFUJI <yoshfuji@xxxxxxxxxxxxxxxxx>
Web Page: http://www.ecei.tohoku.ac.jp/%7Eyoshfuji/
PGP5i FP: F731 6599 5EB2 BBA7 1515 1323 1806 A96F 5700 6B25
|