diff options
| author | Matthew N. Dodd <mdodd@FreeBSD.org> | 2002-03-29 09:52:01 +0000 |
|---|---|---|
| committer | Matthew N. Dodd <mdodd@FreeBSD.org> | 2002-03-29 09:52:01 +0000 |
| commit | 071c2e5cc2fa571ba2c08540836d92d8d6ec4bfb (patch) | |
| tree | 8d30741a199860003411f8185168a2eb44267df8 /sys/net | |
| parent | 98db21b9c79d48492739312aae0f3250e5ebaf56 (diff) | |
Notes
Diffstat (limited to 'sys/net')
| -rw-r--r-- | sys/net/if_fddisubr.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/sys/net/if_fddisubr.c b/sys/net/if_fddisubr.c index 61d7c5723901..7100fc5bd254 100644 --- a/sys/net/if_fddisubr.c +++ b/sys/net/if_fddisubr.c @@ -300,6 +300,7 @@ fddi_output(ifp, m, dst, rt0) else bcopy((caddr_t)ac->ac_enaddr, (caddr_t)fh->fddi_shost, FDDI_ADDR_LEN); + /* * If a simplex interface, and the packet is being sent to our * Ethernet address or a broadcast address, loopback a copy. @@ -309,8 +310,7 @@ fddi_output(ifp, m, dst, rt0) * on the wire). However, we don't do that here for security * reasons and compatibility with the original behavior. */ - if ((ifp->if_flags & IFF_SIMPLEX) && - (loop_copy != -1)) { + if ((ifp->if_flags & IFF_SIMPLEX) && (loop_copy != -1)) { if ((m->m_flags & M_BCAST) || loop_copy) { struct mbuf *n = m_copy(m, 0, (int)M_COPYALL); @@ -379,6 +379,7 @@ fddi_input(ifp, fh, m) #endif l = mtod(m, struct llc *); + switch (l->llc_dsap) { #if defined(INET) || defined(INET6) || defined(NS) || defined(DECNET) || defined(IPX) || defined(NETATALK) case LLC_SNAP_LSAP: @@ -404,10 +405,14 @@ fddi_input(ifp, fh, m) return; } #endif /* NETATALK */ - if (l->llc_snap.org_code[0] != 0 || l->llc_snap.org_code[1] != 0|| l->llc_snap.org_code[2] != 0) + if (l->llc_snap.org_code[0] != 0 || + l->llc_snap.org_code[1] != 0 || + l->llc_snap.org_code[2] != 0) goto dropanyway; + type = ntohs(l->llc_snap.ether_type); - m_adj(m, 8); + m_adj(m, LLC_SNAPFRAMELEN); + switch (type) { #ifdef INET case ETHERTYPE_IP: @@ -470,17 +475,21 @@ fddi_input(ifp, fh, m) default: /* printf("fddi_input: unknown dsap 0x%x\n", l->llc_dsap); */ ifp->if_noproto++; - dropanyway: - m_freem(m); - return; + goto dropanyway; } (void) IF_HANDOFF(inq, m, NULL); + return; + +dropanyway: + ifp->if_iqdrops++; + if (m) + m_freem(m); + return; } /* * Perform common duties while attaching to interface list */ - void fddi_ifattach(ifp) struct ifnet *ifp; |
