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/netinet/if_ether.c | |
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/netinet/if_ether.c')
-rw-r--r-- | sys/netinet/if_ether.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index de5d906..8c8f01f 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -368,7 +368,7 @@ arpresolve(ac, rt, m, dst, desten, rt0) register u_char *desten; struct rtentry *rt0; { - register struct llinfo_arp *la = 0; + struct llinfo_arp *la = 0; struct sockaddr_dl *sdl; if (m->m_flags & M_BCAST) { /* broadcast */ @@ -404,6 +404,14 @@ arpresolve(ac, rt, m, dst, desten, rt0) return 1; } /* + * If ARP is disabled on this interface, stop. + * XXX + * Probably should not allocate empty llinfo struct if we are + * not going to be sending out an arp request. + */ + 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 * latest one. |