Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net Enqueue the mbuf with the start of the packet,



details:   https://anonhg.NetBSD.org/src/rev/2bc41fdb39e0
branches:  trunk
changeset: 796818:2bc41fdb39e0
user:      ws <ws%NetBSD.org@localhost>
date:      Thu Jun 19 16:54:40 2014 +0000

description:
Enqueue the mbuf with the start of the packet,
not some intermediate one (hi, rmind!).

diffstat:

 sys/net/if_tun.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (32 lines):

diff -r eb11895d72a4 -r 2bc41fdb39e0 sys/net/if_tun.c
--- a/sys/net/if_tun.c  Thu Jun 19 16:34:21 2014 +0000
+++ b/sys/net/if_tun.c  Thu Jun 19 16:54:40 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_tun.c,v 1.118 2014/06/05 23:48:16 rmind Exp $       */
+/*     $NetBSD: if_tun.c,v 1.119 2014/06/19 16:54:40 ws Exp $  */
 
 /*
  * Copyright (c) 1988, Julian Onions <jpo%cs.nott.ac.uk@localhost>
@@ -15,7 +15,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_tun.c,v 1.118 2014/06/05 23:48:16 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_tun.c,v 1.119 2014/06/19 16:54:40 ws Exp $");
 
 #include "opt_inet.h"
 
@@ -940,11 +940,11 @@
                error = ENXIO;
                goto out;
        }
-       if (__predict_false(!pktq_enqueue(pktq, m, 0))) {
+       if (__predict_false(!pktq_enqueue(pktq, top, 0))) {
                ifp->if_collisions++;
                mutex_exit(&tp->tun_lock);
                error = ENOBUFS;
-               m_freem(m);
+               m_freem(top);
                goto out_nolock;
        }
        ifp->if_ipackets++;



Home | Main Index | Thread Index | Old Index