diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2000-06-18 04:49:33 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2000-06-18 04:49:33 +0000 |
commit | 95e9959eee6bffa94cb3c59304353a1fc79ee7d0 (patch) | |
tree | d6a3c5609d0d0751fd60961315585f6d80fa10b4 /sys/netinet6/in6_src.c | |
parent | 848264201281c4d36e2320b0cf27f74589f1b54d (diff) |
don't panic even if in6p == NULL.
(this should have been there with tcp_ident change... sorry)
Diffstat (limited to 'sys/netinet6/in6_src.c')
-rw-r--r-- | sys/netinet6/in6_src.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/netinet6/in6_src.c b/sys/netinet6/in6_src.c index f2d9beeef1e..15909d873f6 100644 --- a/sys/netinet6/in6_src.c +++ b/sys/netinet6/in6_src.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in6_src.c,v 1.5 2000/06/13 10:12:01 itojun Exp $ */ +/* $OpenBSD: in6_src.c,v 1.6 2000/06/18 04:49:32 itojun Exp $ */ /* $KAME: in6_src.c,v 1.23 2000/06/12 08:15:27 itojun Exp $ */ /* @@ -353,14 +353,14 @@ in6_embedscope(in6, sin6, in6p, ifpp) * KAME assumption: link id == interface id */ - if (in6p->inp_outputopts6 && + if (in6p && in6p->inp_outputopts6 && (pi = in6p->inp_outputopts6->ip6po_pktinfo) && pi->ipi6_ifindex) { ifp = ifindex2ifnet[pi->ipi6_ifindex]; in6->s6_addr16[1] = htons(pi->ipi6_ifindex); - } else if (IN6_IS_ADDR_MULTICAST(in6) - && in6p->inp_moptions6 - && in6p->inp_moptions6->im6o_multicast_ifp) { + } else if (in6p && IN6_IS_ADDR_MULTICAST(in6) && + in6p->inp_moptions6 && + in6p->inp_moptions6->im6o_multicast_ifp) { ifp = in6p->inp_moptions6->im6o_multicast_ifp; in6->s6_addr16[1] = htons(ifp->if_index); } else if (scopeid) { |