git: ip: Allow ip_mreqn support for IP_MULTICAST_IF, IP_{ADD, DROP}_MEMBERSHIP

Sepherosa Ziehau sephe at crater.dragonflybsd.org
Tue Dec 8 07:44:52 PST 2020


commit 1926f5871d8d40d0c202c5029b76a54a8e99de5b
Author: Sepherosa Ziehau <sephe at dragonflybsd.org>
Date:   Mon Dec 7 23:16:53 2020 +0800

    ip: Allow ip_mreqn support for IP_MULTICAST_IF,IP_{ADD,DROP}_MEMBERSHIP
    
    - ip_mreqn.imr_ifindex takes precendence over ip_mreqn.imr_address,
      if it's not 0.  This strictly follows what Linux does.
    - Allow ip_mreq for IP_MULTICAST_IF as what Linux does.
    
    While I'm here, remove unnecessary critical section among
    IP_MULTICAST_IF, IP_{ADD,DROP}_MEMBERSHIP.
    
    Bump kernel version.
    
    Requested-by: tuxillo

Summary of changes:
 sys/netinet/in.h               |  11 +++
 sys/netinet/ip_output.c        | 165 +++++++++++++++++++++++++++--------------
 sys/sys/param.h                |   4 +-
 test/udp/mcastbind/mcastbind.c |  49 ++++++++----
 test/udp/mcastsend/mcastsend.c |  57 ++++++++++++--
 5 files changed, 206 insertions(+), 80 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/1926f5871d8d40d0c202c5029b76a54a8e99de5b


-- 
DragonFly BSD source repository



More information about the Commits mailing list