NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/50189: ndp(8) -I delete doesn't work



>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.



Home | Main Index | Thread Index | Old Index