From owner-freebsd-bugs Sat Jun 2 12:56:46 2001 Delivered-To: freebsd-bugs@freebsd.org Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by hub.freebsd.org (Postfix) with ESMTP id B968237B422; Sat, 2 Jun 2001 12:56:40 -0700 (PDT) (envelope-from brdavis@odin.ac.hmc.edu) Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.11.0/8.11.0) id f52JudC32115; Sat, 2 Jun 2001 12:56:39 -0700 Date: Sat, 2 Jun 2001 12:56:39 -0700 From: Brooks Davis To: freebsd-bugs@freebsd.org Cc: freebsd-gnats-submit@freebsd.org Subject: Re: kern/25006: cannot ignore arp (ifconfig -arp doesn't work) Message-ID: <20010602125639.B31096@Odin.AC.HMC.Edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="IiVenqGWf+H9Y6IX" Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --IiVenqGWf+H9Y6IX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I took a look at this and verified that yes, it is a bug and the patch does fix it (at least for Ethernet). One potential minor issue with it is that you still end up with "incomplete" ARP entries for hosts you don't have static entries for. I think that's pretty much harmless though. Below is an updated patch against a May 30th current. The only real changes from the origional are Token Ring support and a comment change. -- Brooks Index: net/if_ethersubr.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/sys/net/if_ethersubr.c,v retrieving revision 1.93 diff -u -r1.93 if_ethersubr.c --- net/if_ethersubr.c 2001/05/02 16:12:58 1.93 +++ net/if_ethersubr.c 2001/06/02 17:35:17 @@ -542,6 +542,8 @@ break; =20 case ETHERTYPE_ARP: + if (ifp->if_flags & IFF_NOARP) + goto dropanyway; schednetisr(NETISR_ARP); inq =3D &arpintrq; break; @@ -638,6 +640,7 @@ return; } #else /* NETATALK */ + dropanyway: if (ng_ether_input_orphan_p !=3D NULL) (*ng_ether_input_orphan_p)(ifp, m, eh); else Index: net/if_fddisubr.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/sys/net/if_fddisubr.c,v retrieving revision 1.50 diff -u -r1.50 if_fddisubr.c --- net/if_fddisubr.c 2001/03/11 05:31:41 1.50 +++ net/if_fddisubr.c 2001/06/02 05:50:55 @@ -443,6 +443,8 @@ break; =20 case ETHERTYPE_ARP: + if (ifp->if_flags & IFF_NOARP) + goto dropanyway; #if !defined(__bsdi__) || _BSDI_VERSION >=3D 199401 schednetisr(NETISR_ARP); inq =3D &arpintrq; Index: net/if_iso88025subr.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/sys/net/if_iso88025subr.c,v retrieving revision 1.16 diff -u -r1.16 if_iso88025subr.c --- net/if_iso88025subr.c 2001/03/18 05:43:25 1.16 +++ net/if_iso88025subr.c 2001/06/02 05:52:04 @@ -473,6 +473,8 @@ break; =20 case ETHERTYPE_ARP: + if (ifp->if_flags & IFF_NOARP) + goto dropanyway; schednetisr(NETISR_ARP); inq =3D &arpintrq; break; Index: netinet/if_ether.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/sys/netinet/if_ether.c,v retrieving revision 1.79 diff -u -r1.79 if_ether.c --- netinet/if_ether.c 2001/03/27 12:34:58 1.79 +++ netinet/if_ether.c 2001/06/02 19:45:27 @@ -403,6 +403,8 @@ 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 @@ -484,7 +486,8 @@ =20 #ifdef INET /* - * ARP for Internet protocols on 10 Mb/s Ethernet. + * ARP for Internet protocols on IEEE 802 protocols (Ethernet, FDDI, + * and Token Ring). * Algorithm is that given in RFC 826. * In addition, a sanity check is performed on the sender * protocol address, to catch impersonators. --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --IiVenqGWf+H9Y6IX Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE7GUT3XY6L6fI4GtQRAn/DAKCoBZLWIvZ/5jt+g9Mj8Zz4rEehHQCgwOAd N6SSwBE2i5Ra1vVTEViU0BY= =Zgrx -----END PGP SIGNATURE----- --IiVenqGWf+H9Y6IX-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message