summaryrefslogtreecommitdiff
path: root/sys/netinet/if_ether.c
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2019-11-07 11:23:25 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2019-11-07 11:23:25 +0000
commit634744860174d0336dc8207648750d3c6d600d7a (patch)
tree7c667bb05741f2b5294c338c7becf7b66e17c4e8 /sys/netinet/if_ether.c
parent950f170b75541a4f79eb8b010c30001f6046757e (diff)
Avoid NULL dereference in arpinvalidate() and nd6_invalidate() by
making RTM_INVALIDATE code path perform same check as RTM_DELETE does. ok mpi@
Diffstat (limited to 'sys/netinet/if_ether.c')
-rw-r--r--sys/netinet/if_ether.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c
index e23c94ab4c1..f950dbebc33 100644
--- a/sys/netinet/if_ether.c
+++ b/sys/netinet/if_ether.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ether.c,v 1.241 2019/10/16 10:22:01 mpi Exp $ */
+/* $OpenBSD: if_ether.c,v 1.242 2019/11/07 11:23:23 krw Exp $ */
/* $NetBSD: if_ether.c,v 1.31 1996/05/11 12:59:58 mycroft Exp $ */
/*
@@ -207,6 +207,8 @@ arp_rtrequest(struct ifnet *ifp, int req, struct rtentry *rt)
break;
case RTM_INVALIDATE:
+ if (la == NULL)
+ break;
if (!ISSET(rt->rt_flags, RTF_LOCAL))
arpinvalidate(rt);
break;