diff options
author | jlemon <jlemon@FreeBSD.org> | 2001-06-15 21:00:32 +0000 |
---|---|---|
committer | jlemon <jlemon@FreeBSD.org> | 2001-06-15 21:00:32 +0000 |
commit | 3d3ee69a37239c7be7ecc751a3701c3160744ad6 (patch) | |
tree | 788001f84c15a8cb27491aa23b90e3be2cc80fb8 /sys/net | |
parent | 6f314caece31aef6e6e71ee3a0b4dc54e77c766d (diff) | |
download | FreeBSD-src-3d3ee69a37239c7be7ecc751a3701c3160744ad6.zip FreeBSD-src-3d3ee69a37239c7be7ecc751a3701c3160744ad6.tar.gz |
Do not perform arp send/resolve on an interface marked NOARP.
PR: 25006
MFC after: 2 weeks
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_ethersubr.c | 5 | ||||
-rw-r--r-- | sys/net/if_fddisubr.c | 7 | ||||
-rw-r--r-- | sys/net/if_iso88025subr.c | 2 |
3 files changed, 9 insertions, 5 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index f475f91..5b646b8 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -542,6 +542,11 @@ ether_demux(ifp, eh, m) break; case ETHERTYPE_ARP: + if (ifp->if_flags & IFF_NOARP) { + /* Discard packet if ARP is disabled on interface */ + m_freem(m); + return; + } schednetisr(NETISR_ARP); inq = &arpintrq; break; diff --git a/sys/net/if_fddisubr.c b/sys/net/if_fddisubr.c index 734eeec..0fc8451 100644 --- a/sys/net/if_fddisubr.c +++ b/sys/net/if_fddisubr.c @@ -443,14 +443,11 @@ fddi_input(ifp, fh, m) break; case ETHERTYPE_ARP: -#if !defined(__bsdi__) || _BSDI_VERSION >= 199401 + if (ifp->if_flags & IFF_NOARP) + goto dropanyway; schednetisr(NETISR_ARP); inq = &arpintrq; break; -#else - arpinput((struct arpcom *)ifp, m); - return; -#endif #endif #ifdef INET6 case ETHERTYPE_IPV6: diff --git a/sys/net/if_iso88025subr.c b/sys/net/if_iso88025subr.c index a5538e0..2fd7747 100644 --- a/sys/net/if_iso88025subr.c +++ b/sys/net/if_iso88025subr.c @@ -473,6 +473,8 @@ iso88025_input(ifp, th, m) break; case ETHERTYPE_ARP: + if (ifp->if_flags & IFF_NOARP) + goto dropanyway; schednetisr(NETISR_ARP); inq = &arpintrq; break; |