[Xorp-hackers] RFC: Use one socket per interface for receiving packets in the FEA.
Ben Greear
greearb at candelatech.com
Fri Feb 29 17:05:11 PST 2008
Here's a first attempt at using one rx socket per device, and binding to
that particular
device. This keeps us from receiving multicast traffic not destined for
us when we are running
multiple instances of xorp on the same system.
This code appears to work, but it does not properly clean up sockets
when devices
are un-configured. I'll be working on that next.
This code will be less efficient than the old way if the OS doesn't support
SO_BINDTODEVICE, so I'll also add some code to mimic the old behaviour
in that case (ie, windows).
There's also some other cruft in there to deal with races around
removing interfaces
and removing the OSPF multicast groups. These changes have nothing in
particular
to do with per-interface rx sockets.
Suggestions for improvements are welcome.
Thanks,
Ben
--
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc http://www.candelatech.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fea.patch
Type: text/x-patch
Size: 41612 bytes
Desc: not available
Url : http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20080229/aee8a84b/attachment-0001.bin
More information about the Xorp-hackers
mailing list