From: Karsten Keil <kkeil@suse.de>
To: Vlad Yasevich <vladislav.yasevich@hp.com>
Cc: Andreas Gruenbacher <agruen@suse.de>, Jiri Bohac <jbohac@suse.cz>,
netdev@vger.kernel.org, yoshfuji@linux-ipv6.org, kkeil@suse.de
Subject: Re: Why does a connect to IPv6 LLA address fail ?
Date: Thu, 8 Nov 2007 19:32:22 +0100 [thread overview]
Message-ID: <20071108183221.GA17878@pingi.kke.suse.de> (raw)
In-Reply-To: <47335258.4000806@hp.com>
On Thu, Nov 08, 2007 at 01:15:52PM -0500, Vlad Yasevich wrote:
> Andreas Gruenbacher wrote:
> > On Wednesday 07 November 2007 20:42, Vlad Yasevich wrote:
> >> The reason is that 2 different hosts may have the same link-local
> >> address as long as they are on different links. If the sender is
> >> connected to both links then it may send the packet to the wrong
> >> destination.
> >
> > Good point.
> >
> > What's confusing is that connect(2) fails even if the host itself has the
> > specified address. This isn't necessary.
>
> Yes and no. Since linux doesn't have the concept of default zone, we have
> to fail, because from the perspective of the kernel, the address was not
> fully specified. OTOH, since this is our address, we 'could' have all
> the info.
>
> The problem is that this verification happens before we hit the routing logic.
> It's an explicit check the if the sin6_scope_id is not set and we are not bound
> to an interface, it's an error.
>
OK I run into this issue while running the TAHI testsuite. The test is as
follows:
Check 03:
DNS Address: fec0::9
Candidate Source Addresses: fec0::1(SS) or LLA(LS)
Destination Address List: 3fff::2(GS) or fe80::2(LS)
Result: fe80::2 (src LLA) then 3fff::2 (src fec0::1)
Scope(fe80::2) = Scope(LLA) and Scope(3fff::2) <> Scope(fec0::1), then prefer fe80::2
the nameserver send following answer for the query:
| | | | DNS_Question (length:21)
| | | | | DNS_QuestionEntry (length:21)
| | | | | | Name = server.tahi.org.
| | | | | | Type = 28 (AAAA)
| | | | | | Class = 1
| | | | DNS_Answer (length:86)
| | | | | DNS_RR_AAAA (length:43)
| | | | | | Name = server.tahi.org.
| | | | | | Type = 28
| | | | | | Class = 1
| | | | | | TTL = 0
| | | | | | Length = 16
| | | | | | Address = 3fff::2
| | | | | DNS_RR_AAAA (length:43)
| | | | | | Name = server.tahi.org.
| | | | | | Type = 28
| | | | | | Class = 1
| | | | | | TTL = 0
| | | | | | Length = 16
| | | | | | Address = fe80::2
So how we should handle this issue, claim that the test is wrong, the test
should not use LLA for this ?
--
Karsten Keil
SuSE Labs
ISDN and VOIP development
SUSE LINUX Products GmbH, Maxfeldstr.5 90409 Nuernberg, GF: Markus Rex, HRB 16746 (AG Nuernberg)
next prev parent reply other threads:[~2007-11-08 18:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-07 9:40 Why does a connect to IPv6 LLA address fail ? Karsten Keil
2007-11-07 11:28 ` Jiri Bohac
2007-11-07 19:42 ` Vlad Yasevich
2007-11-08 18:01 ` Andreas Gruenbacher
2007-11-08 18:15 ` Vlad Yasevich
2007-11-08 18:32 ` Karsten Keil [this message]
2007-11-08 20:50 ` Vlad Yasevich
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=20071108183221.GA17878@pingi.kke.suse.de \
--to=kkeil@suse.de \
--cc=agruen@suse.de \
--cc=jbohac@suse.cz \
--cc=netdev@vger.kernel.org \
--cc=vladislav.yasevich@hp.com \
--cc=yoshfuji@linux-ipv6.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).