]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC r281380:
authorae <ae@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 24 Apr 2015 02:43:02 +0000 (02:43 +0000)
committerae <ae@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 24 Apr 2015 02:43:02 +0000 (02:43 +0000)
commit5d04e3cdd11ac6b4898b01977994d1a909a2959c
treeea833186aaf49adef1161c8b22dc10f0b08f0751
parentba893f138910644916e4eded2d4ca3014e84b979
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/9@281914 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/netinet6/in6_mcast.c