svn commit: r364111 - stable/12/sys/netinet6

Mark Johnston markj at FreeBSD.org
Tue Aug 11 13:51:49 UTC 2020


Author: markj
Date: Tue Aug 11 13:51:48 2020
New Revision: 364111
URL: https://svnweb.freebsd.org/changeset/base/364111

Log:
  MFC r363841:
  Remove an incorrect assertion from in6p_lookup_mcast_ifp().

Modified:
  stable/12/sys/netinet6/in6_mcast.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/netinet6/in6_mcast.c
==============================================================================
--- stable/12/sys/netinet6/in6_mcast.c	Tue Aug 11 12:41:40 2020	(r364110)
+++ stable/12/sys/netinet6/in6_mcast.c	Tue Aug 11 13:51:48 2020	(r364111)
@@ -1818,31 +1818,27 @@ ip6_getmoptions(struct inpcb *inp, struct sockopt *sop
  *
  * This routine exists to support legacy IPv6 multicast applications.
  *
- * If inp is non-NULL, use this socket's current FIB number for any
- * required FIB lookup. Look up the group address in the unicast FIB,
- * and use its ifp; usually, this points to the default next-hop.
- * If the FIB lookup fails, return NULL.
+ * Use the socket's current FIB number for any required FIB lookup. Look up the
+ * group address in the unicast FIB, and use its ifp; usually, this points to
+ * the default next-hop.  If the FIB lookup fails, return NULL.
  *
  * FUTURE: Support multiple forwarding tables for IPv6.
  *
  * Returns NULL if no ifp could be found.
  */
 static struct ifnet *
-in6p_lookup_mcast_ifp(const struct inpcb *inp,
-    const struct sockaddr_in6 *gsin6)
+in6p_lookup_mcast_ifp(const struct inpcb *inp, const struct sockaddr_in6 *gsin6)
 {
 	struct nhop6_basic	nh6;
 	struct in6_addr		dst;
 	uint32_t		scopeid;
 	uint32_t		fibnum;
 
-	KASSERT(inp->inp_vflag & INP_IPV6,
-	    ("%s: not INP_IPV6 inpcb", __func__));
 	KASSERT(gsin6->sin6_family == AF_INET6,
 	    ("%s: not AF_INET6 group", __func__));
 
 	in6_splitscope(&gsin6->sin6_addr, &dst, &scopeid);
-	fibnum = inp ? inp->inp_inc.inc_fibnum : RT_DEFAULT_FIB;
+	fibnum = inp->inp_inc.inc_fibnum;
 	if (fib6_lookup_nh_basic(fibnum, &dst, scopeid, 0, 0, &nh6) != 0)
 		return (NULL);
 


More information about the svn-src-stable-12 mailing list