NetBSD Problem Report #50189

From  Wed Sep  2 02:52:38 2015
Return-Path: <>
Received: from ( [])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "", Issuer "Postmaster" (verified OK))
	by (Postfix) with ESMTPS id 62C44A6531
	for <>; Wed,  2 Sep 2015 02:52:38 +0000 (UTC)
Message-Id: <>
Date: Wed,  2 Sep 2015 02:52:37 +0000 (UTC)
Subject: ndp(8) -I delete doesn't work
X-Send-Pr-Version: www-1.0

>Number:         50189
>Category:       kern
>Synopsis:       ndp(8) -I delete doesn't work
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Sep 02 02:55:00 +0000 2015
>Originator:     Ryota Ozaki
>Release:        current
NetBSD rangeley 7.99.21 NetBSD 7.99.21 (RANGELEY) #29: Tue Sep  1 17:23:42 JST 2015  ozaki-r@rangeley:(hidden) amd64
According to ndp(8), ndp -I delete removes the default interface to be used by NDP,
which is set by ndp -I <interface>. However, it doesn't work; it always fails with EINVAL.

Reported by s-yamaguchi@IIJ
# ndp -I wm0
ND default interface = wm0
# ndp -I delete
ndp: ioctl(SIOCSDEFIFACE_IN6): Invalid argument
# ndp -I
ND default interface = wm0

ndp(8) expects that calling ioctl(SIOCSDEFIFACE_IN6) with ifindex=0
removes the default interface. However, the kernel doesn't assumes
so and rejects ifindex=0 because if_byindex(ifindex)) is NULL
(see nd6_setdefaultiface).

A fix is to make nd6_setdefaultiface accept ifindex=0.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD:,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.