fake MAC addresses and ARP



Hi all,

I've got a small problem I'm hoping one of you highly skilled
individuals might have the answer to.

I've got a little driver that communicates via a small buffer on the
motherboard of a Sun Fire V20z to a built-in "service processor" which
is running Linux. The driver on both sides makes the buffer look like a
Ethernet interface.

Now I've ported the Linux driver across to FreeBSD so far without to
much trouble, but now I've hit the limits of my knowledge.

The driver can receive data from the SP just fine, I can tcpdump the
interface and I get all the traffic no problem. But when I attempt to
send anything I get :-

arplookup 169.254.101.2 failed: could not allocate llinfo
arpresolve: can't allocate route for 169.254.101.2

The Linux driver I'm porting simply grabbed any outgoing arp requests,
made up an appropriate response with the pre-defined fake MAC's, put it
into the input queue and ate the request packet.

Now in FreeBSD I cannot see a way to do this other than overriding the
if_output function in the ifp with something of my own. I've tried to do
it in if_start but I never see any arp requests. But I also think the
whole thing is a bit of an ugly hack.

Now I'm thinking I have to do something with rtrequest instead, but I
have no idea what I am required to do in that function to insert the
fake MACs to resolve the route. I get a call for RTM_ADD but then I
don't know what I'm suppose to do. There is no similar device drivers I
can gauge what to do (except the plip driver which doesn't seem to worry
about arp at all!).

Any help would be most appreciated as I'm almost done and I'm running
out of spare time to get this working!

Many thanks,

Alan.

_______________________________________________
freebsd-net@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: E100BEX as a coding start point.
    ... Some vendors release Linux driver source code under GPL. ... I believe the PRO1000 linux driver is written by INTEL. ...
    (microsoft.public.development.device.drivers)
  • Re: [Fw: Cambridge (F-10) Beta release announcement]
    ... Linux driver comes with the ASUS P5Q-SE/R board, for their "Express" Linux, and appears to be GPL. ... I selected the rescue mode, and answered YES to network enable, and the network didn't come up. ... I'll check again tomorrow, the FC9 install has multiple problems with that motherboard, so I don't mind installing several times if needed. ... Thanks for pointing that out, I didn't look for the driver, just assumed that no network meant no driver. ...
    (Fedora)
  • Re: Network card with Linux drivers?
    ... came with the atmel linux driver on cd along with the various m/s ... I just plugged it into a usb port and rebooted and suse ... driver that came on cd with the adapter). ...
    (alt.os.linux.suse)
  • Re: Cant use SYSFS for "Proprietry" driver modules !!!.
    ... "Proprietry" kernel driver for Linux in the first place. ... However, if you do wish to create a Linux driver, you _must_ abide by ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: bge dropping packets issue
    ... Linux tg3 uses one ring for both standard and jumbo. ... > I believe the bnx4 driver (thought the tg stuff was ... Even the Linux driver uses higher number of RX descriptors than ... BCM5705+ does not support jumbo frames and it has one bigger ...
    (freebsd-net)