Date: 11 Feb 2001 17:08:16 -0000 From: fujiwara@rcac.tdi.co.jp To: FreeBSD-gnats-submit@freebsd.org Cc: fujiwara@rcac.tdi.co.jp Subject: kern/25006: cannot ignore arp (ifconfig -arp doesn't work) Message-ID: <20010211170816.962.qmail@f.rcac.tdi.co.jp>
next in thread | raw e-mail | index | archive | help
>Number: 25006 >Category: kern >Synopsis: cannot ignore arp (ifconfig -arp doesn't work) >Confidential: no >Severity: critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Feb 11 09:10:01 PST 2001 >Closed-Date: >Last-Modified: >Originator: Kazunori_Fujiwara >Release: FreeBSD 5.0-CURRENT i386 >Organization: TDI Co.,LTD >Environment: System: FreeBSD spacecraft.f.rcac.tdi.co.jp 5.0-CURRENT FreeBSD 5.0-CURRENT #1: Mon Feb 12 01:44:52 JST 2001 fujiwara@spacecraft.f.rcac.tdi.co.jp:/usr/src/sys/compile/SPACECRAFT i386 current, stable, 4.2-RELEASE, .... >Description: ifconfig ether_interface -arp but cannot ignore ARP. We want to use static arp configuration for firewall. >How-To-Repeat: >Fix: patch from OpenBSD. I checked only ethernet interface. Index: net/if_ethersubr.c =================================================================== RCS file: /FreeBSD-CVS/src/sys/net/if_ethersubr.c,v retrieving revision 1.90 diff -u -r1.90 if_ethersubr.c --- net/if_ethersubr.c 2001/02/10 00:10:13 1.90 +++ net/if_ethersubr.c 2001/02/10 10:50:06 @@ -539,6 +539,8 @@ break; case ETHERTYPE_ARP: + if (ifp->if_flags & IFF_NOARP) + goto dropanyway; schednetisr(NETISR_ARP); inq = &arpintrq; break; @@ -635,6 +637,7 @@ return; } #else /* NETATALK */ + dropanyway: if (ng_ether_input_orphan_p != NULL) (*ng_ether_input_orphan_p)(ifp, m, eh); else Index: net/if_fddisubr.c =================================================================== RCS file: /FreeBSD-CVS/src/sys/net/if_fddisubr.c,v retrieving revision 1.49 diff -u -r1.49 if_fddisubr.c --- net/if_fddisubr.c 2001/02/04 13:12:56 1.49 +++ net/if_fddisubr.c 2001/02/10 10:47:10 @@ -444,6 +444,8 @@ break; case ETHERTYPE_ARP: + if (ifp->if_flags & IFF_NOARP) + goto dropanyway; #if !defined(__bsdi__) || _BSDI_VERSION >= 199401 schednetisr(NETISR_ARP); inq = &arpintrq; Index: if_ether.c =================================================================== RCS file: /FreeBSD-CVS/src/sys/netinet/if_ether.c,v retrieving revision 1.78 diff -u -r1.78 if_ether.c --- netinet/if_ether.c 2001/02/10 00:10:18 1.78 +++ netinet/if_ether.c 2001/02/11 16:44:38 @@ -403,6 +403,9 @@ bcopy(LLADDR(sdl), desten, sdl->sdl_alen); return 1; } + if (ac->ac_if.if_flags & IFF_NOARP) + return 0; + /* * There is an arptab entry, but no ethernet address * response yet. Replace the held mbuf with this >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010211170816.962.qmail>