svn commit: r273587 - in head/sys: net netinet netinet6

Andrey V. Elsukov ae at FreeBSD.org
Fri Oct 24 13:34:23 UTC 2014


Author: ae
Date: Fri Oct 24 13:34:22 2014
New Revision: 273587
URL: https://svnweb.freebsd.org/changeset/base/273587

Log:
  Remove redundant check and m_pullup() call.

Modified:
  head/sys/net/if_gif.c
  head/sys/netinet/in_gif.c
  head/sys/netinet6/in6_gif.c

Modified: head/sys/net/if_gif.c
==============================================================================
--- head/sys/net/if_gif.c	Fri Oct 24 13:29:12 2014	(r273586)
+++ head/sys/net/if_gif.c	Fri Oct 24 13:34:22 2014	(r273587)
@@ -400,8 +400,6 @@ gif_transmit(struct ifnet *ifp, struct m
 	case AF_LINK:
 		proto = IPPROTO_ETHERIP;
 		M_PREPEND(m, sizeof(struct etherip_header), M_NOWAIT);
-		if (m != NULL && m->m_len < sizeof(struct etherip_header))
-			m = m_pullup(m, sizeof(struct etherip_header));
 		if (m == NULL) {
 			error = ENOBUFS;
 			goto err;

Modified: head/sys/netinet/in_gif.c
==============================================================================
--- head/sys/netinet/in_gif.c	Fri Oct 24 13:29:12 2014	(r273586)
+++ head/sys/netinet/in_gif.c	Fri Oct 24 13:34:22 2014	(r273587)
@@ -103,8 +103,6 @@ in_gif_output(struct ifnet *ifp, struct 
 		len += ETHERIP_ALIGN;
 #endif
 	M_PREPEND(m, len, M_NOWAIT);
-	if (m != NULL && m->m_len < len)
-		m = m_pullup(m, len);
 	if (m == NULL)
 		return (ENOBUFS);
 #ifndef __NO_STRICT_ALIGNMENT

Modified: head/sys/netinet6/in6_gif.c
==============================================================================
--- head/sys/netinet6/in6_gif.c	Fri Oct 24 13:29:12 2014	(r273586)
+++ head/sys/netinet6/in6_gif.c	Fri Oct 24 13:34:22 2014	(r273587)
@@ -111,8 +111,6 @@ in6_gif_output(struct ifnet *ifp, struct
 		len += ETHERIP_ALIGN;
 #endif
 	M_PREPEND(m, len, M_NOWAIT);
-	if (m != NULL && m->m_len < len)
-		m = m_pullup(m, len);
 	if (m == NULL)
 		return (ENOBUFS);
 #ifndef __NO_STRICT_ALIGNMENT


More information about the svn-src-head mailing list