From: Tushar Shinde <mtk.tushar@gmail.com>
To: Hannes Frederic Sowa <hannes@stressinduktion.org>
Cc: netdev@vger.kernel.org
Subject: Re: IPv6 Policy based routing not working.
Date: Wed, 27 Aug 2014 19:11:14 +0530 [thread overview]
Message-ID: <CABQpAL4tpfAXNbk7AgqV-FZKSSAMVYN_jvOkj58Sc719xKxB-g@mail.gmail.com> (raw)
In-Reply-To: <1409119546.11976.11.camel@localhost>
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)
I think there is problem with so_binddevice. need to dig further.
Tushar
On Wed, Aug 27, 2014 at 11:35 AM, Hannes Frederic Sowa
<hannes@stressinduktion.org> wrote:
> On Mi, 2014-08-27 at 11:32 +0530, Tushar Shinde wrote:
>> So do we need to always use ipv6 address to bind unlike ipv4?
>
> No, I think SO_BINDTODEVICE should work. But ping6 does not use it, so
> one could add support for this to ping with a new option.
>
> ping6 uses cmsg with undefined ipv6 source address but set ifindex and
> that's not at all like SO_BINDTODEVICE.
>
> Bye,
> Hannes
>
>
next prev parent reply other threads:[~2014-08-27 13:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-26 16:02 IPv6 Policy based routing not working Tushar Shinde
2014-08-26 22:01 ` Hannes Frederic Sowa
2014-08-27 4:54 ` Tushar Shinde
2014-08-27 5:55 ` Hannes Frederic Sowa
2014-08-27 6:02 ` Tushar Shinde
2014-08-27 6:05 ` Hannes Frederic Sowa
2014-08-27 13:41 ` Tushar Shinde [this message]
2014-08-27 14:19 ` Hannes Frederic Sowa
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=CABQpAL4tpfAXNbk7AgqV-FZKSSAMVYN_jvOkj58Sc719xKxB-g@mail.gmail.com \
--to=mtk.tushar@gmail.com \
--cc=hannes@stressinduktion.org \
--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).