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

From: Yuji Sekiya (
Date: Fri Jun 02 2000 - 06:13:42 EST

At Sat, 27 May 2000 00:56:42 +0900,
Hideaki YOSHIFUJI <> wrote:

Sorry for my late response for old topic ...

> > 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.

We have to specify the scope_id if we connect / bind socket with
link-local address.

However returning a error when scope_id is not set, it breaks the
backward compatibility of existing IPv6 applications...
Then I think YOSHFUJI's idea that we can set the default value
using proc interface is reasonable.

> 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.


-- Yuji Sekiya

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

This archive was generated by hypermail 2b29 : Wed Jun 07 2000 - 21:00:14 EST