netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* IPV6_PKTINFO seems not to be honored correctly by RAW-sockets
@ 2012-10-30  8:58 Steven Barth
  2012-10-30 10:42 ` Eric Dumazet
  0 siblings, 1 reply; 3+ messages in thread
From: Steven Barth @ 2012-10-30  8:58 UTC (permalink / raw)
  To: netdev; +Cc: Steven Barth

Hi,

I recently noticed that there might be an unexpected behavior in the 
handling of IPV6_PKTINFO for RAW-sockets. It seems that the given 
destination interface is ignored.

I just reproduced this on 3.7.0-rc3 vanilla but some quick tests with 
2.6.32 and 3.5 distro-kernels on different machines showed the same.

I've noticed this first in my own software but I could also reproduce it 
easily with standard tools like ping6 from iputils:

Have 2 network interfaces with (global) IPv6-addresses assigned (e.g. 
eth0 with fd00::1/64 and eth1 with fd01::1/64) and do a ping6 -I eth1 
fd00::1 (ping6 from iputils uses IPV6_PKTINFO internally).

For me the result was that even though I set the interface to eth1 the 
ECHO was still send to eth0.

Also (although probably unrelated) forwarding for IPv6 was disabled.

If I try something similar with IPv4 and ping -I ... the ECHO doesn't go 
out on eth0 but - as expected - on eth1.

However if I use traceroute(6) with -I (ICMP-traceroute) and the -i 
option to determine the interface, packages seem to be sent through the 
expected interface. Internally it seems that traceroute(6) uses 
SO_BINDTODEVICE instead of IP(V6)_PKTINFO which seems to work.

So it seems there might be something wrong with IPV6_PKTINFO or is this 
expected behavior?


Thanks and Regards,

Steven

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

end of thread, other threads:[~2012-10-30 16:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-30  8:58 IPV6_PKTINFO seems not to be honored correctly by RAW-sockets Steven Barth
2012-10-30 10:42 ` Eric Dumazet
2012-10-30 16:52   ` Steven Barth

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