[strongSwan-dev] Proxy ARP plugin farp or FreeBSD

Dr. Rolf Jansen rj at obsigna.com
Mon Oct 6 13:58:19 CEST 2014

Am 01.10.2014 um 04:20 schrieb Martin Willi <martin at strongswan.org>:

> Hi Rolf,
>> 1. Did somebody port already the farp plugin to *BSD or perhaps to Mac
>>   OS X?
> No, at least nothing has been discussed here.
>> 2. Is it feasible at all, or would proxy arp on FreeBSD not work in a
>>   similar manner as on Linux?
> I think so. farp_spoofer.c is probably the only part that needs porting,
> and that doesn't have that much code. I'm no FreeBSD expert, but as long
> as you have AF_PACKET and BPF it looks absolutely doable. 
> As you already noticed, the most tricky part is probably to get the
> includes right on both systems.

Hello Martin!

Many thanks for your reply.

I investigated this a little bit more, and for me the main problem is now, that in FreeBSD, I cannot attach a BPF to an arbitrary socket. On FreeBSD a BPF device must be opened, and a network interface on which to filter must be associated with that bpf device. In order to continue, I need to find out somehow an identifier of the interface which serves as the arp-proxy already in farp_spoofer_create(), then I could create a bpf device on each call to farp_spoofer_create() and associated the arp-proxy-interface with that.

If a plugin in the course of instance creation could know either of the interface dev-name, IP- or MAC-address, then using getifaddrs(3) it should be possible to find out anything necessary. However, I am no more that sure that proxy arp on FreeBSD could work the same as on Linux.

Best regards


More information about the Dev mailing list