Source-Changes archive

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

CVS commit: src/sys/netinet



Module Name:    src
Committed By:   knakahara
Date:           Thu Nov 17 05:02:11 UTC 2022

Modified Files:
        src/sys/netinet: in.c

Log Message:
Fix sending broken RTM_DELADDR message in some operations.

Here is mininum reproduction operation.
====================
# ifconfig ixg0 172.16.0.1/29
# route monitor &
# ifconfig pppoe0 172.16.0.1/32 0.0.0.1
====================

The broken RTM_DELADDR is the following.
====================
got message of size 72 on Thu Nov 17 12:50:42 2022
#13: len 72, got message of size 80 on Thu Nov 17 12:50:42 2022
RTM_DELADDR: address being removed from iface: len 80, pid 3552, metric 0, addrflags: 0
sockaddrs: 0xb4<NETMASK,IFP,IFA,BRD>
 Q00.00.ff.ff.ff.ff.00.00.00.00.00.00.00.00 pppoe0 default default
====================

This problem is related to the following two commit.

(1) https://github.com/NetBSD/src/commit/b0210214689f17ec08988acd7ef8ae9cdc4c68bc
    that is, sys/netinet/in.c:r1.183

(2) https://github.com/NetBSD/src/commit/61bad33c44f2f6a01a030e8aa5840c015716792a
    that is, sys/netinet/in.c:r1.185

(1) adds in_scrubaddr() for old addresses to in_ifinit() without checking
IFA_ROUTE.
And then, (2) removes in_ifscrub() for POINTTOPOINT interface in in_control0.
The removed in_ifscrub() is called with checking IFA_ROUTE.
It seems these modifications about checking IFA_ROUTE logic causes this
problem, however the real reason is calling in_ifscrub() for the interface
which does not have IPv4 address.  So, scrubbing old address processing
should be done only if the interface already has IPv4 address.


To generate a diff of this commit:
cvs rdiff -u -r1.244 -r1.245 src/sys/netinet/in.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