]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Support struct ip_mreqn as argument for IP_ADD_MEMBERSHIP. Legacy support
authorGleb Smirnoff <glebius@FreeBSD.org>
Sat, 23 Feb 2019 06:03:18 +0000 (06:03 +0000)
committerGleb Smirnoff <glebius@FreeBSD.org>
Sat, 23 Feb 2019 06:03:18 +0000 (06:03 +0000)
commit0dfc145abe244443bb38ee81617462992bf21cf2
treed0495502b587c8674cdaff23ebf0fee979980a0f
parente806165bee38257eb6d94b46cdacb16996af461b
Support struct ip_mreqn as argument for IP_ADD_MEMBERSHIP. Legacy support
for struct ip_mreq remains in place.

The struct ip_mreqn is Linux extension to classic BSD multicast API. It
has extra field allowing to specify the interface index explicitly. In
Linux it used as argument for IP_MULTICAST_IF and IP_ADD_MEMBERSHIP.
FreeBSD kernel also declares this structure and supports it as argument
to IP_MULTICAST_IF since r170613. So, we have structure declared but
not fully supported, this confused third party application configure
scripts.

Code handling IP_ADD_MEMBERSHIP was mixed together with code for
IP_ADD_SOURCE_MEMBERSHIP.  Bringing legacy and new structure support
into the mess would made the "argument switcharoo" intolerable, so
code was separated into its own switch case clause.

MFC after: 3 months
Differential Revision: https://reviews.freebsd.org/D19276
share/man/man4/ip.4
sys/netinet/in_mcast.c