diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2019-11-24 07:50:56 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2019-11-24 07:50:56 +0000 |
commit | addec0d6c4d097c5a87223fea7c356fc367ad303 (patch) | |
tree | bcec7ac004efe73e12384a9afe16f0a5922d8ce3 | |
parent | 3e3e450b4560f8fa3842bea15f20c339a12c72b3 (diff) |
Make it possible to call ether_rtrequest with a NULL rt argument.
In that case the function can just return. Part of a larger diff
to use the if_rtrequest functions for RTM_PROPOSAL info.
OK florian@
-rw-r--r-- | sys/net/if_ethersubr.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 2b1739313a0..322ffe34409 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ethersubr.c,v 1.260 2019/07/17 16:46:17 mpi Exp $ */ +/* $OpenBSD: if_ethersubr.c,v 1.261 2019/11/24 07:50:55 claudio Exp $ */ /* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */ /* @@ -170,6 +170,9 @@ ether_ioctl(struct ifnet *ifp, struct arpcom *arp, u_long cmd, caddr_t data) void ether_rtrequest(struct ifnet *ifp, int req, struct rtentry *rt) { + if (rt == NULL) + return; + switch (rt_key(rt)->sa_family) { case AF_INET: arp_rtrequest(ifp, req, rt); |