From: Stephen Hemminger <shemminger@vyatta.com>
To: Julian Anastasov <ja@ssi.bg>
Cc: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [BUG] VPN broken in net-next
Date: Thu, 3 Mar 2011 09:32:15 -0800 [thread overview]
Message-ID: <20110303093215.40164b8c@nehalam> (raw)
In-Reply-To: <alpine.LFD.2.00.1103031454060.2113@ja.ssi.bg>
> Hello,
>
> On Thu, 3 Mar 2011, Julian Anastasov wrote:
>
> > May be the problem is in inet_hash_insert(), it should
> > hash ifa_local, not ifa_address. May be they are equal for
>
> ... and of course the new __ip_dev_find should use
> ifa_local too.
>
> > the common case but not for peer addresses. In devinet_ioctl()
> > we can see they are equal initially:
> >
> > ifa->ifa_address = ifa->ifa_local = sin->sin_addr.s_addr;
> >
> > but later SIOCSIFDSTADDR can change ifa_address which
> > is destination address from the same prefix:
> >
> > ifa->ifa_address = sin->sin_addr.s_addr;
>
> While checking for ifa_address usage I see other
> two places that look suspicious:
>
> - inet_gifconf() exposes address from ifa_local but then
> devinet_ioctl() matches by ifa_address in the
> 'if (tryaddrmatch)' block. I think, we should use ifa_local.
>
> - IN_DEV_ARP_NOTIFY: announces ifa_address instead of ifa_local.
Julian you are on the right track with the ifa_local being the issue.
1. Bring up VPN
(no errors)
2. Ping one address gets connect error
3. Instrumentation triggers. I added code so if __ip_dev_find failed,
it walked the hash table.
net=ffffffff81a12d80
[ 393.224228] __ip_dev_find(ffffffff81a12d80, 10.250.0.104) hash=108 failed
[ 393.224232] 138: ffffffff81a12d80 ifa_addr=127.0.0.1 ifa_local=127.0.0.1
[ 393.224236] 150: ffffffff81a12d80 ifa_addr=192.168.1.11 ifa_local=192.168.1.11
[ 393.224239] 249: ffffffff81a12d80 ifa_addr=192.168.100.1 ifa_local=192.168.100.1
[ 393.224242] 254: ffffffff81a12d80 ifa_addr=192.168.99.1 ifa_local=192.168.99.1
[ 393.224245] 255: ffffffff81a12d80 ifa_addr=10.255.254.0 ifa_local=10.250.0.10
next prev parent reply other threads:[~2011-03-03 17:32 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-03 0:28 [BUG] VPN broken in net-next Stephen Hemminger
2011-03-03 0:41 ` Stephen Hemminger
2011-03-03 0:43 ` David Miller
2011-03-03 0:46 ` Stephen Hemminger
2011-03-03 0:50 ` David Miller
2011-03-03 0:54 ` David Miller
2011-03-03 12:41 ` Julian Anastasov
2011-03-03 13:09 ` Julian Anastasov
2011-03-03 17:32 ` Stephen Hemminger [this message]
2011-03-03 19:23 ` David Miller
2011-03-03 21:54 ` Stephen Hemminger
2011-03-04 8:39 ` Julian Anastasov
2011-03-23 4:56 ` David Miller
2011-03-23 9:05 ` Julian Anastasov
2011-03-23 15:24 ` Stephen Hemminger
2011-03-09 21:28 ` David Miller
2011-03-03 0:56 ` Stephen Hemminger
2011-03-03 1:03 ` David Miller
2011-03-03 1:16 ` Stephen Hemminger
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=20110303093215.40164b8c@nehalam \
--to=shemminger@vyatta.com \
--cc=davem@davemloft.net \
--cc=ja@ssi.bg \
--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).