optp may be NULL.

This commit is contained in:
Hajimu UMEMOTO 2010-08-20 17:52:49 +00:00
parent be55a6bd2a
commit 365ccde0fb

View File

@ -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;