From: Roberto Arcomano <berto@fatamorgana.com>
To: linux-kernel@vger.kernel.org
Subject: Re: Patch suggestion for proxy arp on shaper interface
Date: Tue, 24 Jul 2001 12:10:18 +0200 [thread overview]
Message-ID: <01072412101804.01562@berto.casa.it> (raw)
In-Reply-To: <01072222314006.01071@berto.casa.it>
In-Reply-To: <01072222314006.01071@berto.casa.it>
[-- Attachment #1: Type: text/plain, Size: 2548 bytes --]
Il 22:31, domenica 22 luglio 2001, Roberto Arcomano ha scritto:
> Hi all,
> Recently I have had a problem with Linux proxy arp feature (using with
> shaper interface): when I machine starts up it was receiving a "IP
> conflits". The problem is that Linux proxy_arp routine doesn't make
> difference between real interface (i.e. eth0) and shaper interface (i.e.
> shaper0 which has been attached to eth0).
> I attach a first beta solution to the problem, which could be far from
> optimal! (I use a "strncmp", cause I didn't found another method to know if
> the device is a "shaper" device).
>
>
> --- arp.c.orig Wed May 16 19:21:45 2001
> +++ arp.c Sun Jul 22 19:31:20 2001
> @@ -111,7 +111,7 @@
>
> #include <asm/system.h>
> #include <asm/uaccess.h>
> -
> +#include <linux/if_shaper.h>
>
>
> /*
> @@ -767,10 +767,17 @@
> }
> goto out;
> } else if (IN_DEV_FORWARD(in_dev)) {
> + char shflag=0;
> + if ( (rt->u.dst.dev) &&
> + (rt->u.dst.dev->priv) &&
> + (((struct shaper *) rt->u.dst.dev->priv)->dev)
> && +
> (strncmp(rt->u.dst.dev->name,"shaper",6)==0) ) +
> shflag=1;
> if ((rt->rt_flags&RTCF_DNAT) ||
> - (addr_type == RTN_UNICAST && rt->u.dst.dev !=
> dev &&
> + (addr_type == RTN_UNICAST &&
> + ( ((shflag) && ( ((struct shaper *)
> rt->u.dst.dev->priv)->dev != dev)) || ((!shflag) && (rt->u.dst.dev != dev))
> ) &&
> (IN_DEV_PROXY_ARP(in_dev) ||
> pneigh_lookup(&arp_tbl, &tip, dev, 0)))) {
> - n = neigh_event_ns(&arp_tbl, sha, &sip,
> dev); + n = neigh_event_ns(&arp_tbl, sha,
> &sip, dev); if (n)
>
>
> The patch declare a variable (flag to know if the interface is
> shaper-like), investigate on private data of shaper device (where we can
> know what is the attached interface) and set the flag. After we consider
> the "attached" interface if flag is set.
>
> I tested it under 2.4.6 on RedHat 7.1 with success (there is no more IP
> conflit).
> Hope it'll useful.
>
> Best Regards
> Roberto Arcomano
Please someone takes a look at it! This is a bug of proxy arp feature (when
talking with shaper interface) could be correct (for example using my patch).
Thank you for your help
Best Regards
Roberto Arcomano
[-- Attachment #2: Diff file for arp.c --]
[-- Type: text/x-c, Size: 1014 bytes --]
--- arp.c.orig Wed May 16 19:21:45 2001
+++ arp.c Sun Jul 22 19:31:20 2001
@@ -111,7 +111,7 @@
#include <asm/system.h>
#include <asm/uaccess.h>
-
+#include <linux/if_shaper.h>
/*
@@ -767,10 +767,17 @@
}
goto out;
} else if (IN_DEV_FORWARD(in_dev)) {
+ char shflag=0;
+ if ( (rt->u.dst.dev) &&
+ (rt->u.dst.dev->priv) &&
+ (((struct shaper *) rt->u.dst.dev->priv)->dev) &&
+ (strncmp(rt->u.dst.dev->name,"shaper",6)==0) )
+ shflag=1;
if ((rt->rt_flags&RTCF_DNAT) ||
- (addr_type == RTN_UNICAST && rt->u.dst.dev != dev &&
+ (addr_type == RTN_UNICAST &&
+ ( ((shflag) && ( ((struct shaper *) rt->u.dst.dev->priv)->dev != dev)) || ((!shflag) && (rt->u.dst.dev != dev)) ) &&
(IN_DEV_PROXY_ARP(in_dev) || pneigh_lookup(&arp_tbl, &tip, dev, 0)))) {
- n = neigh_event_ns(&arp_tbl, sha, &sip, dev);
+ n = neigh_event_ns(&arp_tbl, sha, &sip, dev);
if (n)
neigh_release(n);
next prev parent reply other threads:[~2001-07-24 10:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-22 20:31 Patch suggestion for proxy arp on shaper interface Roberto Arcomano
2001-07-24 10:10 ` Roberto Arcomano [this message]
2001-07-24 22:31 ` Alexey Kuznetsov
2001-07-25 18:06 ` Roberto Arcomano
[not found] <01072520050001.01036@berto.casa.it>
2001-07-25 18:54 ` kuznet
-- strict thread matches above, loose matches on Subject: below --
2001-07-26 0:34 Roberto Arcomano
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=01072412101804.01562@berto.casa.it \
--to=berto@fatamorgana.com \
--cc=linux-kernel@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