Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Add missing binding of VLAN tag to received packet.



details:   https://anonhg.NetBSD.org/src/rev/f8431cf87364
branches:  trunk
changeset: 542853:f8431cf87364
user:      mjacob <mjacob%NetBSD.org@localhost>
date:      Sun Feb 09 21:43:43 2003 +0000

description:
Add missing binding of VLAN tag to received packet.

diffstat:

 sys/dev/pci/if_ti.c |  12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diffs (38 lines):

diff -r 15436b449a58 -r f8431cf87364 sys/dev/pci/if_ti.c
--- a/sys/dev/pci/if_ti.c       Sun Feb 09 20:46:29 2003 +0000
+++ b/sys/dev/pci/if_ti.c       Sun Feb 09 21:43:43 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ti.c,v 1.56 2003/01/31 05:00:25 thorpej Exp $ */
+/* $NetBSD: if_ti.c,v 1.57 2003/02/09 21:43:43 mjacob Exp $ */
 
 /*
  * Copyright (c) 1997, 1998, 1999
@@ -81,7 +81,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ti.c,v 1.56 2003/01/31 05:00:25 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ti.c,v 1.57 2003/02/09 21:43:43 mjacob Exp $");
 
 #include "bpfilter.h"
 #include "opt_inet.h"
@@ -2075,14 +2075,16 @@
 
                        mtag = m_tag_get(PACKET_TAG_VLAN, sizeof(u_int),
                            M_NOWAIT);
-                       if (mtag)
+                       if (mtag) {
                                *(u_int *)(mtag + 1) = vlan_tag;
-                       else {
+                               m_tag_prepend(m, mtag);
+                               have_tag = vlan_tag = 0;
+                       } else {
                                printf("%s: no mbuf for tag\n", ifp->if_xname);
                                m_freem(m);
+                               have_tag = vlan_tag = 0;
                                continue;
                        }
-                       have_tag = vlan_tag = 0;
                }
                (*ifp->if_input)(ifp, m);
        }



Home | Main Index | Thread Index | Old Index