mirror of
https://github.com/freebsd/freebsd-src
synced 2024-11-05 18:22:52 +00:00
Fill in the corresponding ether address of multicast and broadcast
pseudo-``ARP entries'' so arp(8) doesn't show them as `unresolved'.
This commit is contained in:
parent
abc8ea162c
commit
cbb0b46ab7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=13926
1 changed files with 17 additions and 1 deletions
|
@ -31,7 +31,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)if_ether.c 8.1 (Berkeley) 6/10/93
|
||||
* $Id: if_ether.c,v 1.25 1995/12/20 21:53:51 wollman Exp $
|
||||
* $Id: if_ether.c,v 1.26 1996/01/24 21:09:58 phk Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -209,6 +209,22 @@ arp_rtrequest(req, rt, sa)
|
|||
la->la_rt = rt;
|
||||
rt->rt_flags |= RTF_LLINFO;
|
||||
LIST_INSERT_HEAD(&llinfo_arp, la, la_le);
|
||||
|
||||
/*
|
||||
* This keeps the multicast addresses from showing up
|
||||
* in `arp -a' listings as unresolved. It's not actually
|
||||
* functional. Then the same for broadcast.
|
||||
*/
|
||||
if (IN_MULTICAST(ntohl(SIN(rt_key(rt))->sin_addr.s_addr))) {
|
||||
ETHER_MAP_IP_MULTICAST(&SIN(rt_key(rt))->sin_addr,
|
||||
LLADDR(SDL(gate)));
|
||||
SDL(gate)->sdl_alen = 6;
|
||||
}
|
||||
if (in_broadcast(SIN(rt_key(rt))->sin_addr, rt->rt_ifp)) {
|
||||
memcpy(LLADDR(SDL(gate)), etherbroadcastaddr, 6);
|
||||
SDL(gate)->sdl_alen = 6;
|
||||
}
|
||||
|
||||
if (SIN(rt_key(rt))->sin_addr.s_addr ==
|
||||
(IA_SIN(rt->rt_ifa))->sin_addr.s_addr) {
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue