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 01:54:27 +0300 [thread overview]
Message-ID: <200907010154.27457.denys@visp.net.lb> (raw)
In-Reply-To: <m1r5x1z5z4.fsf@fess.ebiederm.org>
[-- Attachment #1: Type: text/plain, Size: 724 bytes --]
On Wednesday 01 July 2009 01:55:59 Eric W. Biederman wrote:
>
> I have a problem with this patch. It stops gratuitous arps updating
> my arp cache. I'm still trying to figure out what the correct behaviour
> should be.
>
> Perhaps making the goto out; become if (sip == 0) goto out;
Yes, you are right.
Proposing 3 simple patches against git next-next-2.6 . As attaches (sorry,
kmail). All of them equal, but since i am amateur in programming, i dont know
how it is should be done "nice way".
If you want to test it - do it carefully. I didn't did runtime tests yet, but
they are compile tested. (But they are trivial).
If someone can review and tell if any of them ok, i will submit it with proper
tags and etc.
[-- Attachment #2: patch1.diff --]
[-- Type: text/x-diff, Size: 694 bytes --]
diff -uprN net-next-2.6/net/ipv4/arp.c net-next-2.6.my/net/ipv4/arp.c
--- net-next-2.6/net/ipv4/arp.c 2009-07-01 01:00:58.000000000 +0300
+++ net-next-2.6.my/net/ipv4/arp.c 2009-07-01 01:24:19.000000000 +0300
@@ -811,11 +811,9 @@ static int arp_process(struct sk_buff *s
!arp_ignore(in_dev, sip, tip))
arp_send(ARPOP_REPLY, ETH_P_ARP, sip, dev, tip, sha,
dev->dev_addr, sha);
- goto out;
- }
-
- if (arp->ar_op == htons(ARPOP_REQUEST) &&
- ip_route_input(skb, tip, sip, 0, dev) == 0) {
+ if (sip == 0) goto out;
+ } else if (arp->ar_op == htons(ARPOP_REQUEST) &&
+ ip_route_input(skb, tip, sip, 0, dev) == 0) {
rt = skb_rtable(skb);
addr_type = rt->rt_type;
[-- Attachment #3: patch2.diff --]
[-- Type: text/x-diff, Size: 726 bytes --]
diff -uprN net-next-2.6/net/ipv4/arp.c net-next-2.6.my2/net/ipv4/arp.c
--- net-next-2.6/net/ipv4/arp.c 2009-07-01 01:00:58.000000000 +0300
+++ net-next-2.6.my2/net/ipv4/arp.c 2009-07-01 01:25:38.000000000 +0300
@@ -811,7 +811,10 @@ static int arp_process(struct sk_buff *s
!arp_ignore(in_dev, sip, tip))
arp_send(ARPOP_REPLY, ETH_P_ARP, sip, dev, tip, sha,
dev->dev_addr, sha);
- goto out;
+ if (tip == sip)
+ goto update;
+ else
+ goto out;
}
if (arp->ar_op == htons(ARPOP_REQUEST) &&
@@ -858,6 +861,7 @@ static int arp_process(struct sk_buff *s
/* Update our ARP tables */
+update:
n = __neigh_lookup(&arp_tbl, &sip, dev, 0);
if (IPV4_DEVCONF_ALL(dev_net(dev), ARP_ACCEPT)) {
[-- Attachment #4: patch3.diff --]
[-- Type: text/x-diff, Size: 421 bytes --]
diff -uprN net-next-2.6/net/ipv4/arp.c net-next-2.6.my3/net/ipv4/arp.c
--- net-next-2.6/net/ipv4/arp.c 2009-07-01 01:00:58.000000000 +0300
+++ net-next-2.6.my3/net/ipv4/arp.c 2009-07-01 01:26:09.000000000 +0300
@@ -815,6 +815,7 @@ static int arp_process(struct sk_buff *s
}
if (arp->ar_op == htons(ARPOP_REQUEST) &&
+ tip != sip &&
ip_route_input(skb, tip, sip, 0, dev) == 0) {
rt = skb_rtable(skb);
next prev parent reply other threads:[~2009-07-01 3:29 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 [this message]
[not found] ` <m1iqicyjmr.fsf@fess.ebiederm.org>
2009-07-01 9:00 ` Denys Fedoryschenko
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=200907010154.27457.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.