From 365ccde0fb7f2b0809adf0c6be9ad511baf1dc90 Mon Sep 17 00:00:00 2001 From: Hajimu UMEMOTO Date: Fri, 20 Aug 2010 17:52:49 +0000 Subject: [PATCH] optp may be NULL. --- sys/netinet6/raw_ip6.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c index 0e5e8e07e17d..6c10fc5479bd 100644 --- a/sys/netinet6/raw_ip6.c +++ b/sys/netinet6/raw_ip6.c @@ -434,7 +434,8 @@ rip6_output(m, va_alist) * XXX: we may still need to determine the zone later. */ if (!(so->so_state & SS_ISCONNECTED)) { - if (!optp->ip6po_pktinfo || !optp->ip6po_pktinfo->ipi6_ifindex) + if (!optp || !optp->ip6po_pktinfo || + !optp->ip6po_pktinfo->ipi6_ifindex) use_defzone = V_ip6_use_defzone; if (dstsock->sin6_scope_id == 0 && !use_defzone) scope_ambiguous = 1;