Re: [PATCH for 2.4.0-test1] IPv6 cannot bind|connect to link local address without scope_id

From: $B5HF#1QL@ (($B5HF#1QL@())
Date: Fri May 26 2000 - 10:56:42 EST


In article <87hfbluzr6.wl@lichee.ukai.org> (at Fri, 26 May 2000 23:55:57 +0900), Fumitoshi UKAI <ukai@debian.or.jp> says:

> Is this, that is, connect(2) for link local addr without sin6_scope_id
> will fail, right behavior? If so, should we fix userland application?

Yes, we should fix useland applications.
Set sk->bound_dev (!= 0) if BEFORE connect(2) / bind(2), or they will fail;
Bind(2) / connect(2) without sin6_scope_id while sk->bound_dev_is 0
(or no default value is set) should be invalid.
This is very reasonable behavior.

Or,... we may want to select the default value of sk->bound_dev_if
for link-local address by write to proc file-system like:
 # echo 1 > /proc/net/default_linklocal_scopeid
and if connect(2) / bind(2) is called for link-local address without
sin6_scope_id while sk->bound_dev_if is zero, sk->bound_dev_if
will be set to 1 in the connect(2) / bind(2) function.

-- 
Hideaki YOSHIFUJI <yoshfuji@ecei.tohoku.ac.jp>
Web Page: http://www.ecei.tohoku.ac.jp/%7Eyoshfuji/
PGP5i FP: F731 6599 5EB2 BBA7 1515  1323 1806 A96F 5700 6B25 

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed May 31 2000 - 21:00:16 EST