From: Andreas Henriksson <andreas@fatal.se>
To: netdev@vger.kernel.org
Subject: Adding IP(v6) address with scope link creates global address
Date: Wed, 25 Nov 2009 14:59:45 +0100 [thread overview]
Message-ID: <20091125135945.GA7195@amd64.fatal.se> (raw)
Hello!
"Jedasothi" reported problems setting scope with iproute on newly added
ipv6 addresses in:
https://bugs.launchpad.net/ubuntu/+source/iproute/+bug/487745
> To reproduce bug run
> ip addr add '::4/64' scope link dev eth0
>
> This results in a line seen with
> ip addr show eth0
> inet6 ::4/64 scope global tentative
>
> The label "global" is seen instead of "link".
This works for me on ipv4 and seems to be only a problem with ipv6.
I think this is a kernel bug. The scope seems to be passed into the
kernel via netlink as specified on the command line.
Looking at the kernel, inet6_rtm_newaddr [1] calls inet6_addr_add [2]
without passing the ifa_scope struct member and then the scope is
generated from the address within the inet6_addr_add function.
It would be nice if someone could verify this and while at it
also whip up a patch and forward to the right person. ;)
[1]: http://lxr.linux.no/#linux+v2.6.31/net/ipv6/addrconf.c#L3263
[2]: http://lxr.linux.no/#linux+v2.6.31/net/ipv6/addrconf.c#L2081
--
Andreas Henriksson
next reply other threads:[~2009-11-25 13:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-25 13:59 Andreas Henriksson [this message]
2009-12-07 13:41 ` [PATCH/RFC] Adding IP(v6) address with scope link creates global address Andreas Henriksson
2009-12-07 17:18 ` Brian Haley
2009-12-07 19:30 ` Andreas Henriksson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091125135945.GA7195@amd64.fatal.se \
--to=andreas@fatal.se \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).