summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2016-03-24 07:15:10 +0000
committermpi <mpi@openbsd.org>2016-03-24 07:15:10 +0000
commitbde66f81cd8f2a679059a2f0bef72f19b95c50dc (patch)
treedae702a1107950705dcbf3fbd1cb62212f0c41c5
parentMake sure that two ARP entries can be created for the same IP when (diff)
downloadwireguard-openbsd-bde66f81cd8f2a679059a2f0bef72f19b95c50dc.tar.xz
wireguard-openbsd-bde66f81cd8f2a679059a2f0bef72f19b95c50dc.zip
Ensure that a found proxy ARP entry has the correct flag.
ok bluhm@
-rw-r--r--sys/netinet/if_ether.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c
index 041025dce8c..50095387798 100644
--- a/sys/netinet/if_ether.c
+++ b/sys/netinet/if_ether.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ether.c,v 1.202 2016/03/07 11:00:36 mpi Exp $ */
+/* $OpenBSD: if_ether.c,v 1.203 2016/03/24 07:15:10 mpi Exp $ */
/* $NetBSD: if_ether.c,v 1.31 1996/05/11 12:59:58 mycroft Exp $ */
/*
@@ -696,6 +696,12 @@ arplookup(u_int32_t addr, int create, int proxy, u_int tableid)
rtfree(rt);
return (NULL);
}
+
+ if (proxy && !ISSET(rt->rt_flags, RTF_ANNOUNCE)) {
+ rtfree(rt);
+ return (NULL);
+ }
+
return (rt);
}