diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2018-01-04 00:33:55 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2018-01-04 00:33:55 +0000 |
commit | c71b288294c82a10ab3a182e85c23f1aa62151e4 (patch) | |
tree | 8a764af4e191c41d6f45b84588399dae1e478cb8 /sys | |
parent | 9814148b1b367b7ffca91de3caa089bc886ff9f5 (diff) |
remove support for decapsulating LLC/SNAP frames.
the code was broken and noone noticed. this argues that we don't
need it.
ok mpi@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/if_ethersubr.c | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index f0dadddfbfc..f6376883b54 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ethersubr.c,v 1.247 2018/01/03 19:39:36 denis Exp $ */ +/* $OpenBSD: if_ethersubr.c,v 1.248 2018/01/04 00:33:54 dlg Exp $ */ /* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */ /* @@ -317,8 +317,6 @@ ether_input(struct ifnet *ifp, struct mbuf *m, void *cookie) struct ether_header *eh; struct niqueue *inq; u_int16_t etype; - int llcfound = 0; - struct llc *l; struct arpcom *ac; #if NPPPOE > 0 struct ether_header *eh_tmp; @@ -376,7 +374,6 @@ ether_input(struct ifnet *ifp, struct mbuf *m, void *cookie) etype = ntohs(eh->ether_type); -decapsulate: switch (etype) { case ETHERTYPE_IP: ipv4_input(ifp, m); @@ -441,29 +438,7 @@ decapsulate: return (1); #endif default: - if (llcfound || etype > ETHERMTU || - m->m_len < sizeof(struct llc)) - goto dropanyway; - llcfound = 1; - l = mtod(m, struct llc *); - switch (l->llc_dsap) { - case LLC_SNAP_LSAP: - if (l->llc_control == LLC_UI && - l->llc_dsap == LLC_SNAP_LSAP && - l->llc_ssap == LLC_SNAP_LSAP) { - /* SNAP */ - if (m->m_pkthdr.len > etype) - m_adj(m, etype - m->m_pkthdr.len); - m_adj(m, 6); - M_PREPEND(m, sizeof(*eh), M_DONTWAIT); - if (m == NULL) - return (1); - *mtod(m, struct ether_header *) = *eh; - goto decapsulate; - } - default: - goto dropanyway; - } + goto dropanyway; } niq_enqueue(inq, m); |