Add additional robustness to at_aarpinput() by testing for broadcast
addresses as the source of an AARP request. While this PR was submitted in the context of work in OpenBSD to port netatalk (in 1997), I've synchronized the code more to our ARP input routine, which had similar requirements. Submitted by: Denton Gentry PR: kern/4184 MFC after: 1 week
This commit is contained in:
parent
e13e970d04
commit
261a3b571d
@ -354,6 +354,13 @@ at_aarpinput(struct ifnet *ifp, struct mbuf *m)
|
||||
return;
|
||||
}
|
||||
|
||||
/* Don't accept requests from broadcast address. */
|
||||
if (!bcmp(ea->aarp_sha, ifp->if_broadcastaddr, ifp->if_addrlen)) {
|
||||
log(LOG_ERR, "aarp: source link address is broadcast\n");
|
||||
m_freem(m);
|
||||
return;
|
||||
}
|
||||
|
||||
op = ntohs(ea->aarp_op);
|
||||
bcopy(ea->aarp_tpnet, &net, sizeof(net));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user