]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r281380:
authorae <ae@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 24 Apr 2015 02:12:25 +0000 (02:12 +0000)
committerae <ae@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 24 Apr 2015 02:12:25 +0000 (02:12 +0000)
commit2510852fa29ec7923324ada5e01292f528974905
tree86774c7daf8843d69e4bcd96de7099c4f8e38aac
parent8cf544a91c60be8cd5cb9968f7afdd4ea98546bc
MFC r281380:
  Fix the IPV6_MULTICAST_IF sockopt handling. RFC 3493 says when the
  interface index is specified as zero, the system should select the
  interface to use for outgoing multicast packets. Even the comment
  for the in6p_set_multicast_if() function says about index of zero.
  But in fact for zero index the function just returns EADDRNOTAVAIL.

  I.e. if you first set some interface and then will try reset it
  with zero ifindex, you will get EADDRNOTAVAIL.

  Reset im6o_multicast_ifp to NULL when interface index specified as
  zero. Also return EINVAL in case when ifnet_byindex() returns NULL.
  This will be the same behaviour as when ifindex is bigger than
  V_if_index. And return EADDRNOTAVAIL only when interface is not
  multicast capable.

git-svn-id: svn://svn.freebsd.org/base/stable/10@281911 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/netinet6/in6_mcast.c