Source-Changes archive

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

CVS commit: src/sys



Module Name:    src
Committed By:   knakahara
Date:           Tue Sep 20 02:23:38 UTC 2022

Modified Files:
        src/sys/net: if.c route.c route.h
        src/sys/netinet: in.c
        src/sys/netinet6: in6.c
        src/sys/nfs: nfs_boot.c

Log Message:
Remove routes on an address removal if the routes referencing to the address.  Implemented by ozaki-r@n.o.

A route that has a gateway is on a connected route can be invalid if the
connected route is deleted, i.e., an associated address is removed.
Traditionally NetBSD doesn't sweep such a route on the address removal.  Sending
packets over the route fails with "No route to host".  Also the route holds an
orphan ifaddr as rt_ifa that is destructed say by in_purgeaddr.

If the same address is assgined again in such a state, there can be two
different ifaddr objects with the same address.  Until recently it's not a
big problem because we can send packets anyway.  However after MP-ification
of the network stack, we can't send packets because we strictly check if rt_ifa
(i.e., the (old) ifaddr) is valid.

This change automatically removes such routes on a removal of an associated
address to avoid keeping inconsistent routes.


To generate a diff of this commit:
cvs rdiff -u -r1.525 -r1.526 src/sys/net/if.c
cvs rdiff -u -r1.233 -r1.234 src/sys/net/route.c
cvs rdiff -u -r1.131 -r1.132 src/sys/net/route.h
cvs rdiff -u -r1.242 -r1.243 src/sys/netinet/in.c
cvs rdiff -u -r1.285 -r1.286 src/sys/netinet6/in6.c
cvs rdiff -u -r1.88 -r1.89 src/sys/nfs/nfs_boot.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index