diff options
author | 1998-01-21 12:50:54 +0000 | |
---|---|---|
committer | 1998-01-21 12:50:54 +0000 | |
commit | fc4851afdada505617e07056e2966d108f2292c1 (patch) | |
tree | f7d2188aec854f406d156e7846fb40c6330e5324 | |
parent | Prevent a NULL-deref in the autoconf_verbose case (diff) | |
download | wireguard-openbsd-fc4851afdada505617e07056e2966d108f2292c1.tar.xz wireguard-openbsd-fc4851afdada505617e07056e2966d108f2292c1.zip |
Use the sockaddr_dl with the link#, not the ethernet address
when creating proxy arp entries.
-rw-r--r-- | usr.sbin/ppp/arp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ppp/arp.c b/usr.sbin/ppp/arp.c index 20ad1a8410e..21239543b2b 100644 --- a/usr.sbin/ppp/arp.c +++ b/usr.sbin/ppp/arp.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: arp.c,v 1.6 1998/01/19 22:32:01 brian Exp $ + * $Id: arp.c,v 1.7 1998/01/21 12:50:54 brian Exp $ * */ @@ -314,7 +314,7 @@ get_ether_addr(int s, struct in_addr ipaddr, struct sockaddr_dl *hwaddr) sa_gw = (struct sockaddr *)wp; if (sa_gw->sa_family == AF_LINK) { dl = (struct sockaddr_dl *)wp; - if (dl->sdl_alen && dl->sdl_type == IFT_ETHER) { + if (!dl->sdl_nlen && !dl->sdl_alen && !dl->sdl_slen) { memcpy(hwaddr, dl, dl->sdl_len); free(sp); return 1; |