All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denys Fedoryschenko <denys@visp.net.lb>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: netdev@vger.kernel.org, David Miller <davem@davemloft.net>
Subject: Re: [RFC] arp announce, arp_proxy and windows ip conflict verification
Date: Wed, 1 Jul 2009 12:00:26 +0300	[thread overview]
Message-ID: <200907011200.26547.denys@visp.net.lb> (raw)
In-Reply-To: <m1iqicyjmr.fsf@fess.ebiederm.org>

On Wednesday 01 July 2009 09:58:36 Eric W. Biederman wrote:
>
> What problem were you originally trying to solve?
>
> Having a proxy arp gateway reply to addresses it routes is proper
> behaviour.
>
> There are some aspects of RFC 5227 ipv4 address conflict detection that
> we could implement in a better fashion.  In particular the entirety
> of handling the pathological case of someone using one of our ip
> addresses in an arp message and replying to them to defend ourselves.
>
> Your changes seem aimed at having the linux kernel not reply to
> gratuitous arps, when according to our configuration the sender is
> misconfigured.  You seem to want linux not to defend itself in cases
> where it should.  Making us even less compliant with RFC 5227.
>
> Eric
It is still answering to gratuitous arp and handling the case!!!
But why patch was created, to NOT reply in case we have proxy_arp set, and we 
have default gateway. In this case, for example, Windows XP wont work at all 
in network where is Linux host with proxy_arp=1 installed. Because Linux will 
ALWAYS answer to arp requests.
Just only one case i miss (which is not defined in RFC by the way), that some 
software use this packet to update ARP tables on other hosts. And i sent 
patches for that. But imho they should use more legitimate ARP packets for 
that.

I did real testing even for my patch, and sure i sent patch only after that.

ip addr
.....
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:1e:8c:89:78:af brd ff:ff:ff:ff:ff:ff
    inet 10.0.1.21/29 brd 10.0.1.23 scope global eth0

I run windows vista (it sets correctly sip as 0.0.0.0)

home ipv4 # tcpdump -ni eth0
11:48:11.416790 ARP, Request who-has 10.0.1.21 tell 0.0.0.0, length 46
11:48:11.416797 ARP, Reply 10.0.1.21 is-at 00:1e:8c:89:78:af, length 28

2.6.30 vanilla (sure patch is there) handling case correctly.

The case i was trying to handle - proxy arp. Windows XP will be permanently 
disabled on reboot in case of proxy_arp enabled on Linux machine, and this 
Linux have default gateway (means answer to all proxy_arp).

This is XP (no conflict)
11:51:28.297633 ARP, Request who-has 10.0.0.5 tell 10.0.0.5, length 46
11:51:29.283672 ARP, Request who-has 10.0.0.5 tell 10.0.0.5, length 46
11:51:30.284210 ARP, Request who-has 10.0.0.5 tell 10.0.0.5, length 46

This is Linux 2.6.30 with patch applied, and Windows XP, handling correctly IP 
conflict.

11:53:10.440541 ARP, Request who-has 10.0.0.1 tell 10.0.0.1, length 46
11:53:10.440551 ARP, Reply 10.0.0.1 is-at b6:45:02:01:2b:b6, length 28
11:53:10.440796 ARP, Request who-has 10.0.0.1 tell 10.0.0.1, length 46
11:53:10.440799 ARP, Reply 10.0.0.1 is-at b6:45:02:01:2b:b6, length 28
11:53:10.466743 ARP, Request who-has 10.0.0.1 tell 10.0.0.1, length 46
11:53:10.466752 ARP, Reply 10.0.0.1 is-at b6:45:02:01:2b:b6, length 28
11:53:10.466976 ARP, Request who-has 10.0.0.1 tell 10.0.0.1, length 46
11:53:10.466979 ARP, Reply 10.0.0.1 is-at b6:45:02:01:2b:b6, length 28

So WITH patch ip conflict detection working.

And for sure it will work:

<------>if (sip == 0 || tip == sip) { // Yes, sip == tip
<------><------>if (arp->ar_op == htons(ARPOP_REQUEST) && // Yes it is request
<------><------>    inet_addr_type(net, tip) == RTN_LOCAL && // Yes this ip i 
have on my own host
<------><------>    !arp_ignore(in_dev, sip, tip)) // No i won't ignore this 
<------><------><------>arp_send(ARPOP_REPLY, ETH_P_ARP, sip, dev, tip, sha,
<------><------><------><------> dev->dev_addr, sha); // Send the host who 
sent gratuitous ip - that i am using it already.
<------><------>goto out;
<------>}


  parent reply	other threads:[~2009-07-01  9:00 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-01 11:44 [RFC] arp announce, arp_proxy and windows ip conflict verification Denys Fedoryschenko
2009-03-13 23:02 ` David Miller
2009-06-30 22:55 ` Eric W. Biederman
2009-06-30 22:54   ` Denys Fedoryschenko
     [not found]     ` <m1iqicyjmr.fsf@fess.ebiederm.org>
2009-07-01  9:00       ` Denys Fedoryschenko [this message]
2009-07-01  9:42       ` Denys Fedoryschenko
2009-07-01 17:40         ` Eric W. Biederman
2009-07-01 18:12           ` Denys Fedoryschenko
2009-07-01 19:01           ` Denys Fedoryschenko
2009-07-02 20:36             ` Eric W. Biederman
2009-07-02 20:51             ` Eric W. Biederman
2009-07-02 21:22               ` Denys Fedoryschenko
2009-07-02 22:18                 ` Eric W. Biederman
2009-07-02 23:03                   ` Denys Fedoryschenko
2009-07-02 23:23                     ` Eric W. Biederman
2009-07-02 23:46                       ` Denys Fedoryschenko
2009-07-03  1:38                         ` David Miller
2009-07-03  3:14                         ` Eric W. Biederman
2009-07-03 11:02                           ` Denys Fedoryschenko
2009-07-03 20:20                             ` David Miller
2009-07-03 20:37                               ` Denys Fedoryschenko
2009-07-04  0:46                                 ` Eric W. Biederman
2009-07-04  7:55                                   ` Denys Fedoryschenko
2009-07-04 15:00                                     ` Eric W. Biederman
2009-07-04 15:03                                       ` Denys Fedoryschenko
2009-07-04 21:57                                         ` Eric W. Biederman
2009-07-04 22:00                                           ` Denys Fedoryschenko
2009-07-04 23:22                                             ` Mark Smith
2009-07-05  0:07                                               ` Eric W. Biederman
2009-07-05  0:28                                                 ` Denys Fedoryschenko
2009-07-05  6:16                                                 ` Mark Smith
2009-07-04 23:47                                             ` Eric W. Biederman
2009-07-03  1:34                     ` David Miller
2009-07-02 23:13                   ` Denys Fedoryschenko
2009-07-01  2:27   ` [PATCH] Revert "ipv4: arp announce, arp_proxy and windows ip conflict verification" Eric W. Biederman
2009-07-01  3:10     ` David Miller

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=200907011200.26547.denys@visp.net.lb \
    --to=denys@visp.net.lb \
    --cc=davem@davemloft.net \
    --cc=ebiederm@xmission.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.