Source-Changes-HG archive

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

[src/trunk]: src/sys/net Fix appletalk over ethernet.



details:   https://anonhg.NetBSD.org/src/rev/f6deb1ddd13b
branches:  trunk
changeset: 477136:f6deb1ddd13b
user:      matt <matt%NetBSD.org@localhost>
date:      Tue Oct 12 04:53:45 1999 +0000

description:
Fix appletalk over ethernet.

diffstat:

 sys/net/if_ethersubr.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r b4f08d953efd -r f6deb1ddd13b sys/net/if_ethersubr.c
--- a/sys/net/if_ethersubr.c    Tue Oct 12 00:36:17 1999 +0000
+++ b/sys/net/if_ethersubr.c    Tue Oct 12 04:53:45 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ethersubr.c,v 1.49 1999/09/21 22:18:51 matt Exp $   */
+/*     $NetBSD: if_ethersubr.c,v 1.50 1999/10/12 04:53:45 matt Exp $   */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -440,6 +440,10 @@
        if (mcopy)
                (void) looutput(ifp, mcopy, dst, rt);
 
+       /* If no ether type is set, this must be a 802.2 formatted packet.
+        */
+       if (etype == 0)
+               etype = htons(m->m_pkthdr.len);
        /*
         * Add local net header.  If no space in first mbuf,
         * allocate another.
@@ -448,8 +452,6 @@
        if (m == 0)
                senderr(ENOBUFS);
        eh = mtod(m, struct ether_header *);
-       if (etype == 0)
-               etype = htons(m->m_pkthdr.len);
        bcopy((caddr_t)&etype,(caddr_t)&eh->ether_type,
                sizeof(eh->ether_type));
        bcopy((caddr_t)edst, (caddr_t)eh->ether_dhost, sizeof (edst));



Home | Main Index | Thread Index | Old Index