Ion Badulescu <ionut@moisil.cs.columbia.edu> writes:
> In article <cs.lists.linux-kernel/al87leb9l5f.fsf@sirppi.helsinki.fi> you wrote:
> > Standard *bsd behavior (which works (at least) on {Net,Open}BSD and certain
> > commercial *NIXes):
> >
> > arp -s <ip> <ether_addr> pub
> >
> > => whenever ARP request for <ip> shows up, we reply with <ether_addr>.
> >
> > I seem to be unable to reproduce this behavior with Linux (at least 2.2 or
> > 2.3.99pre series); it seems that hwaddr for published addrs isn't even
> > written down (at least, /proc/net/arp says it's 00:00:00:... or *, don't
> > remember which), and nothing of interest occurs when ARP request shows up
> > on the ethernet interface.
> It's not supported, the underlying data structures do not have a field for
> the supplied MAC address. What the code does is try to match the supplied MAC
> address against the MAC addresses of all interfaces, then store a pointer to
> the matching interface structure in the proxy arp structure.
Doh.. I was somewhat afraid of that, after brief reading of the code and
those experiments I mentioned. How come such a basic feature is missing?
(I can't think offhand of any other UNIX-like system I have running that
doesn't support that :P)
I seriously think arp command should indicate that "if you give me hardware
address with publish flag, we'll happily ignore it and you can screw
yourself", considering the manual pages seem quite alike to the certain
free BSDs' (and commercial *NIXes) manual pages, yet the behavior is
different.
> I've written a patch to allow this behavior by adding a MAC address field to
> struct pneigh_entry, but it's mostly untested and rather in-elegant. I needed
> it to allow the sharing of a virtual MAC address between two different
> machines, and I got it to the point where it correctly replies to the ARP
> request and gives of the virtual MAC address. I'd would like to know however
> if this is a legitimate thing to have in the official kernel..
Well, if we intend to have proxy arp, as defined in RFC925, _for interfaces
the kernel does not know about_, it is needful. As long as we can assume
that "kernel knows everything, all is well and good", things work, but they
will break if user/applications' knowledge exceeds that of kernel.
And regrettably that can happen on occassion.
> Ion
>
> --
> It is better to keep your mouth shut and be thought a fool,
> than to open it and remove all doubt.
-Markus
P.S.
I'd like to have that patch, so I needn't write my own (-:
-- But let your communication be Yea, yea; nay, nay: for whatsoever is more than these cometh of evil. -- Matthew 5:37 (basis for using binary number system in modern computer coding theory)- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Fri Apr 07 2000 - 21:00:18 EST