diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2003-05-15 15:00:44 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2003-05-15 15:00:44 +0000 |
commit | b26960d4501b22db2730ba5cc697e9efc6de67f7 (patch) | |
tree | 9ac42c707671d10cc2fa78be6150a93f53d06b3f /sys/netinet6 | |
parent | 4e0284f2e58d40fb42018d1d51372eeaf35ddd8a (diff) |
rt->rt_ifp may not always be available. masanori kanaoka via kame
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/nd6_rtr.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c index 721c2275e07..eed6e6ab42d 100644 --- a/sys/netinet6/nd6_rtr.c +++ b/sys/netinet6/nd6_rtr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nd6_rtr.c,v 1.25 2003/05/14 14:24:44 itojun Exp $ */ +/* $OpenBSD: nd6_rtr.c,v 1.26 2003/05/15 15:00:43 itojun Exp $ */ /* $KAME: nd6_rtr.c,v 1.97 2001/02/07 11:09:13 itojun Exp $ */ /* @@ -430,9 +430,11 @@ nd6_rtmsg(cmd, rt) info.rti_info[RTAX_DST] = rt_key(rt); info.rti_info[RTAX_GATEWAY] = rt->rt_gateway; info.rti_info[RTAX_NETMASK] = rt_mask(rt); - info.rti_info[RTAX_IFP] = - TAILQ_FIRST(&rt->rt_ifp->if_addrlist)->ifa_addr; - info.rti_info[RTAX_IFA] = rt->rt_ifa->ifa_addr; + if (rt->rt_ifp) { + info.rti_info[RTAX_IFP] = + TAILQ_FIRST(&rt->rt_ifp->if_addrlist)->ifa_addr; + info.rti_info[RTAX_IFA] = rt->rt_ifa->ifa_addr; + } rt_missmsg(cmd, &info, rt->rt_flags, 0); } |