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
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to