Interface index hack in IP_ADD_MEMBERSHIP
Bruce M Simpson
bms at incunabulum.net
Mon Mar 19 16:51:32 UTC 2007
Eugene Grosbein wrote:
>
> I recall that routed and ripd used to utilize something similar
> long time ago. I'm not sure if they have switched to another API.
>
You're right -- this would break routed on point-to-point interfaces.
They didn't, unless it was updated at the upstream, i.e. rhyolite.com.
This means that the RFC1724 hack can't be safely deprecated without
breaking this use case, until routed is updated to use the RFC 3678
protocol-independent ASM API.
Linux uses a slightly different technique to work-around this; ip_mreq
is expanded to ip_mreqn internally, and the interface index is
explicitly passed around in the kernel.
The blocker in the FreeBSD case which prevents us simply adopting this
is the source interface selection logic in ip_output().
Regards,
BMS
More information about the freebsd-net
mailing list