summaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2002-06-09 07:50:58 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2002-06-09 07:50:58 +0000
commitc021608bd50b74de1b8074e336f7adad03b1c7d8 (patch)
treefc5215899fe2a68186df7f2dd3c16849b2246dd9 /sys/netinet
parent2294c99c2a1bc351c19879b3bb2e366a8b070e38 (diff)
support published arp entries again. PR 2635 (confirmed by submitter).
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/if_ether.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c
index 9b0257ae8bf..24ec0fa84bd 100644
--- a/sys/netinet/if_ether.c
+++ b/sys/netinet/if_ether.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ether.c,v 1.43 2002/06/09 05:25:50 itojun Exp $ */
+/* $OpenBSD: if_ether.c,v 1.44 2002/06/09 07:50:57 itojun Exp $ */
/* $NetBSD: if_ether.c,v 1.31 1996/05/11 12:59:58 mycroft Exp $ */
/*
@@ -545,6 +545,17 @@ in_arpinput(m)
}
}
+ if (ia == NULL) {
+ struct ifaddr *ifa;
+
+ TAILQ_FOREACH(ifa, &m->m_pkthdr.rcvif->if_addrlist, ifa_list) {
+ if (ifa->ifa_addr->sa_family == AF_INET)
+ break;
+ }
+ if (ifa)
+ ia = (struct in_ifaddr *)ifa;
+ }
+
if (ia == NULL)
goto out;