netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Why does a connect to IPv6 LLA address fail ?
@ 2007-11-07  9:40 Karsten Keil
  2007-11-07 11:28 ` Jiri Bohac
  0 siblings, 1 reply; 7+ messages in thread
From: Karsten Keil @ 2007-11-07  9:40 UTC (permalink / raw)
  To: netdev

Hi,

currently I do some cerification test for IPv6 with the TAHI ct testsuite.
With the default-addr-select tests for compliance with RFC3484 here are
FAILs with Destination Address Selection Check Rule 2(Prefer matching
scope). Yes I know that Destination Address Selection is done in glibc,
but it seems that the kernel behaves wrong in the connect system call
with IPv6 link local addresses. 

The glibc getaddrinfo function try to verify if a address is valid and
examine the source address. For this it create a socket for datagram and
protocol IPPROTO_IP and then try to connect it with the destination
address. This fails in the case of a LLA, because connect returns EINVAL,
since here is no device bind to this socket at this time. So getaddrinfo
mark this candidate address as not reachable and so it will never prefered
because of rule 1 of RFC3484 Destination Address Selection.

Why do we have this check in ip6_datagram_connect() ?

The posix manpage for connect says about EINVAL:
"EINVAL - The address_len argument is not a valid length for the address family; or
invalid address family in the sockaddr structure."

Which is not the case here.

-- 
Karsten Keil
SuSE Labs
ISDN and VOIP development
SUSE LINUX Products GmbH, Maxfeldstr.5 90409 Nuernberg, GF: Markus Rex, HRB 16746 (AG Nuernberg)

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-11-08 20:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2007-11-08 20:50           ` Vlad Yasevich

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