NetBSD Problem Report #50189

From www@NetBSD.org  Wed Sep  2 02:52:38 2015
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 62C44A6531
	for <gnats-bugs@gnats.NetBSD.org>; Wed,  2 Sep 2015 02:52:38 +0000 (UTC)
Message-Id: <20150902025237.29D6DA6558@mollari.NetBSD.org>
Date: Wed,  2 Sep 2015 02:52:37 +0000 (UTC)
From: ozaki-r@netbsd.org
Reply-To: ozaki-r@netbsd.org
To: gnats-bugs@NetBSD.org
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
>Organization:
>Environment:
NetBSD rangeley 7.99.21 NetBSD 7.99.21 (RANGELEY) #29: Tue Sep  1 17:23:42 JST 2015  ozaki-r@rangeley:(hidden) amd64
>Description:
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
>How-To-Repeat:
# ndp -I wm0
ND default interface = wm0
# ndp -I delete
ndp: ioctl(SIOCSDEFIFACE_IN6): Invalid argument
# ndp -I
ND default interface = wm0

>Fix:
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: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.