Subject: Re: IPv6 Policy based routing not working.

From: Hannes Frederic Sowa <[email-masked]>
Date: Wed, 27 Aug 2014 16:19:09 +0200

On Mi, 2014-08-27 at 19:11 +0530, Tushar Shinde wrote:
> ping6 command uses SO_BINDTODEVICE but it looks it is not working. The
> source address in fib6 rule match is 0:::0
> 
> strace ping6 -I eth0 2001:2::20 2> t
> socket(PF_INET6, SOCK_DGRAM, IPPROTO_IP) = 4
> setsockopt(4, SOL_SOCKET, SO_BINDTODEVICE, "eth0\0", 5) = 0
> connect(4, {sa_family=AF_INET6, sin6_port=htons(1025),
> inet_pton(AF_INET6, "2001:2::20", &sin6_addr), sin6_flowinfo=0,
> sin6_scope_id=0}, 28) = -1 ENETUNREACH (Network is unreachable)

$ strace ping6 -c1 -I em1 ::  |& grep SO_BINDTODEVICE
$

Strange, I have a look... thanks!