NetBSD-Bugs archive

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

kern/53707: Routes with a disappeared local address (rt_ifa) can remain



>Number:         53707
>Category:       kern
>Synopsis:       Routes with a disappeared local address (rt_ifa) can remain
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Nov 07 07:45:00 +0000 2018
>Originator:     Ryota Ozaki
>Release:        -current
>Organization:
IIJ
>Environment:
NetBSD kvm 8.99.25 NetBSD 8.99.25 (KVM) #1569: Tue Nov  6 13:24:47 JST 2018
>Description:
A route refers an IP address as its local address that is used as the source
address of an outgoing packet if the source address of the packet is not set
explicitly.

If an IP address is deleted, all routes referring the IP address should be
deleted too or replace its local address with an appropriate address if
available.  However such routes just remain on the current implementation
(see below).
>How-To-Repeat:
kvm# ifconfig vioif0 192.168.0.1/24
kvm# route add default 192.168.0.254
add net default: gateway 192.168.0.254
kvm# ifconfig vioif0 192.168.0.1/24 delete
kvm# ifconfig vioif0
vioif0: flags=0x8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        ec_capabilities=1<VLAN_MTU>
        ec_enabled=0
        address: 52:54:00:bb:18:47
        inet6 fe80::5054:ff:febb:1847%vioif0/64 flags 0x0 scopeid 0x1
kvm# route -n get 192.168.0.254
   route to: 192.168.0.254
destination: default
       mask: default
    gateway: 192.168.0.254
 local addr: 192.168.0.1
  interface: vioif0
      flags: 0x843<UP,GATEWAY,DONE,STATIC>
 recvpipe  sendpipe  ssthresh  rtt,msec    rttvar  hopcount      mtu     expire
       0         0         0         0         0         0         0         0

>Fix:
Remove all routes where rt_ifa == ifa when removing ifa.



Home | Main Index | Thread Index | Old Index