On Sat, Dec 17, 2022 at 01:27:23PM +0000, Alexander Chernikov wrote:
* 0002-FreeBSD-use-interface-index-instead-of-IP-address-wh.patch switches multicast interface specification from ip address to interface index. That allows to avoid iface->sysdep value, which is not filled by netlink.
Nice. Is this supported since long ago, or does it require some recent BSD version? Do you know whether it is supported also in other BSD flavors?
It’s a bit complicated :-)
FreeBSD: IP_MULTICAST_IF - ip_mreqn support was added in [1] @ 2007. IP_<ADD|DEL>_MEMBERSHIP - ip_mreqn support was added in [2] @ 2019 / FreeBSD 12.1. All currently supported FreeBSD versions have this functionality in place
OpenBSD: IP_MULTICAST_IF - ip_mreqn support was added in [3] @ 2021 IP_<ADD|DEL>_MEMBERSHIP - ip_mreqn support was added in [4] @ 2021
NetBSD: IP_MULTICAST_IF, IP_<ADD|DEL>_MEMBERSHIP uses old API hack, treating 0/8 IPv4 addresses as ifindex. It was added in [5] @ 2001
Thanks for the overview! So we can assume that the ip_mreqn API is available since FreeBSD 12.1 and OpenBSD 6.9 and enable CONFIG_USE_IP_MREQN based on __FreeBSD_version and OpenBSD version macros? I generally prefer to keep old system compatibility code for ~ 5 years, although it makes more sense on Linux, where are some LTS distributions with similar long-term commitments, than on BSD. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."