svn commit: r356623 - in stable/11/sys: netinet netinet6

Bjoern A. Zeeb bz at FreeBSD.org
Sat Jan 11 01:15:40 UTC 2020


Author: bz
Date: Sat Jan 11 01:15:38 2020
New Revision: 356623
URL: https://svnweb.freebsd.org/changeset/base/356623

Log:
  MFC r354643:
  
    netinet*: update *mp to pass the proper value back
  
    In ip6_[direct_]input() we are looping over the extension headers
    to deal with the next header.  We pass a pointer to an mbuf pointer
    to the handling functions.  In certain cases the mbuf can be updated
    there and we need to pass the new one back.  That missing in
    dest6_input() and route6_input().  In tcp6_input() we should also
    update it before we call tcp_input().
  
    The merge is extracted of a larger change in head.
  
    PR:			240135
    Reported by:		prabhakar.lakhera gmail.com

Modified:
  stable/11/sys/netinet/tcp_input.c
  stable/11/sys/netinet6/dest6.c
  stable/11/sys/netinet6/icmp6.c
  stable/11/sys/netinet6/route6.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/netinet/tcp_input.c
==============================================================================
--- stable/11/sys/netinet/tcp_input.c	Sat Jan 11 00:11:29 2020	(r356622)
+++ stable/11/sys/netinet/tcp_input.c	Sat Jan 11 01:15:38 2020	(r356623)
@@ -558,6 +558,7 @@ tcp6_input(struct mbuf **mp, int *offp, int proto)
 	if (ia6)
 		ifa_free(&ia6->ia_ifa);
 
+	*mp = m;
 	return (tcp_input(mp, offp, proto));
 }
 #endif /* INET6 */

Modified: stable/11/sys/netinet6/dest6.c
==============================================================================
--- stable/11/sys/netinet6/dest6.c	Sat Jan 11 00:11:29 2020	(r356622)
+++ stable/11/sys/netinet6/dest6.c	Sat Jan 11 01:15:38 2020	(r356623)
@@ -116,6 +116,7 @@ dest6_input(struct mbuf **mp, int *offp, int proto)
 	}
 
 	*offp = off;
+	*mp = m;
 	return (dstopts->ip6d_nxt);
 
   bad:

Modified: stable/11/sys/netinet6/icmp6.c
==============================================================================
--- stable/11/sys/netinet6/icmp6.c	Sat Jan 11 00:11:29 2020	(r356622)
+++ stable/11/sys/netinet6/icmp6.c	Sat Jan 11 01:15:38 2020	(r356623)
@@ -861,6 +861,7 @@ icmp6_input(struct mbuf **mp, int *offp, int proto)
 	/* deliver the packet to appropriate sockets */
 	icmp6_rip6_input(&m, *offp);
 
+	*mp = m;
 	return IPPROTO_DONE;
 
  freeit:

Modified: stable/11/sys/netinet6/route6.c
==============================================================================
--- stable/11/sys/netinet6/route6.c	Sat Jan 11 00:11:29 2020	(r356622)
+++ stable/11/sys/netinet6/route6.c	Sat Jan 11 01:15:38 2020	(r356623)
@@ -108,5 +108,6 @@ route6_input(struct mbuf **mp, int *offp, int proto)
 	}
 
 	*offp += rhlen;
+	*mp = m;
 	return (rh->ip6r_nxt);
 }


More information about the svn-src-all mailing list