NetBSD-Bugs archive

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

Re: kern/57037: unncessary and unwarranted RTM_NEWADDR for IPv6 routing messages



The following reply was made to PR kern/57037; it has been noted by GNATS.

From: Frank Kardel <kardel%netbsd.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: kern/57037: unncessary and unwarranted RTM_NEWADDR for IPv6
 routing messages
Date: Fri, 30 Sep 2022 16:42:23 +0200

 SLAAC is being used (stock NetBSD)
 
 The router advertisements list prefix info option (3), length 32 (4): 
 xxxx:yyyy:zzzz:aaaa:/64, Flags [onlink, auto], valid time 2592000s, 
 pref. time 604800s
 
 This 2 minutes is less than the preferred life time.
 
 The routing message is sent with each router advertisement being received.
 
 13:37:29.518377 IP6 (hlim 255, next-header ICMPv6 (58) payload length: 
 56) fe80::4e02:89ff:fe13:a456 > ff02::1: [icmp6 sum ok] ICMP6, router 
 advertisement, length 56
          hop limit 64, Flags [none], pref high, router lifetime 360s, 
 reachable time 0ms, retrans timer 0ms
            prefix info option (3), length 32 (4): 
 xxxx:yyyy:zzzz:aaaa::/64, Flags [onlink, auto], valid time 2592000s, 
 pref. time 604800s
            source link-address option (1), length 8 (1): 4c:02:89:13:a4:56
 got message of size 112 on Fri Sep 30 13:37:29 2022
 #12: len 112, got message of size 120 on Fri Sep 30 13:37:29 2022
 RTM_NEWADDR: address being added to iface: len 120, pid 3382, metric 0, 
 addrflags: 0x40<AUTOCONF>
 sockaddrs: 0x34<NETMASK,IFP,IFA>
   ffff:ffff:ffff:ffff:: aa:00:00:00:00:ff 
 xxxx:yyyy:zzzz:aaaa:bbbb:cccc:dddd:eeee
 13:39:30.805386 IP6 (hlim 255, next-header ICMPv6 (58) payload length: 
 56) fe80::4e02:89ff:fe13:a456 > ff02::1: [icmp6 sum ok] ICMP6, router 
 advertisement, length 56
          hop limit 64, Flags [none], pref high, router lifetime 360s, 
 reachable time 0ms, retrans timer 0ms
            prefix info option (3), length 32 (4): 
 xxxx:yyyy:zzzz:aaaa::/64, Flags [onlink, auto], valid time 2592000s, 
 pref. time 604800s
            source link-address option (1), length 8 (1): 4c:02:89:13:a4:56
 got message of size 112 on Fri Sep 30 13:39:30 2022
 #12: len 112, got message of size 120 on Fri Sep 30 13:39:30 2022
 RTM_NEWADDR: address being added to iface: len 120, pid 3382, metric 0, 
 addrflags: 0x40<AUTOCONF>
 sockaddrs: 0x34<NETMASK,IFP,IFA>
   ffff:ffff:ffff:ffff:: aa:00:00:00:00:ff 
 xxxx:yyyy:zzzz:aaaa:bbbb:cccc:dddd:eeee
 13:41:32.082752 IP6 (hlim 255, next-header ICMPv6 (58) payload length: 
 56) fe80::4e02:89ff:fe13:a456 > ff02::1: [icmp6 sum ok] ICMP6, router 
 advertisement, length 56
          hop limit 64, Flags [none], pref high, router lifetime 360s, 
 reachable time 0ms, retrans timer 0ms
            prefix info option (3), length 32 (4): 
 xxxx:yyyy:zzzz:aaaa::/64, Flags [onlink, auto], valid time 2592000s, 
 pref. time 604800s
            source link-address option (1), length 8 (1): 4c:02:89:13:a4:56
 got message of size 112 on Fri Sep 30 13:41:32 2022
 #12: len 112, got message of size 120 on Fri Sep 30 13:41:32 2022
 RTM_NEWADDR: address being added to iface: len 120, pid 3382, metric 0, 
 addrflags: 0x40<AUTOCONF>
 sockaddrs: 0x34<NETMASK,IFP,IFA>
   ffff:ffff:ffff:ffff:: aa:00:00:00:00:ff 
 xxxx:yyyy:zzzz:aaaa:bbbb:cccc:dddd:eeee
 
 According to RFC4862 these router adverstisement shoul update the 
 preferred lifetime. Looking the the code this
 
 seems to be the case. Especially RTM_NEWADDR is being sent on any 
 changes of parameters of an address.
 
 Thus RTM_NEWADDR meas a real new address OR address parameters have 
 changed.
 
 That explains why I see ifwatchd -u running the script every two minutes 
 even though the address itself
 
 is not new, but the preferred lifetime was updated.
 
 Oh, well - looks like a feature.
 
 How can we detect the we got a genuine new address instead of updated 
 address parameters?
 
 Frank
 
 
 On 09/30/22 13:35, Joerg Sonnenberger wrote:
 > The following reply was made to PR kern/57037; it has been noted by GNATS.
 >
 > From: Joerg Sonnenberger <joerg%bec.de@localhost>
 > To: gnats-bugs%netbsd.org@localhost
 > Cc: kern-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
 > 	netbsd-bugs%netbsd.org@localhost
 > Subject: Re: kern/57037: unncessary and unwarranted RTM_NEWADDR for IPv6
 >   routing messages
 > Date: Fri, 30 Sep 2022 13:31:42 +0200
 >
 >   Am Fri, Sep 30, 2022 at 09:25:01AM +0000 schrieb kardel%netbsd.org@localhost:
 >   > >How-To-Repeat:
 >   > 	let NetBSD autoconfigure IPv6 and watch "route monitor".
 >   >
 >   > RTM_NEWADDR: address being added to iface: len 120, pid 1709, metric 0, addrflags: 0x40<AUTOCONF>
 >   > sockaddrs: 0x34<NETMASK,IFP,IFA>
 >   >  ffff:ffff:ffff:ffff:: aa:00:00:00:00:01 xxxx:yyyy:zzzz:rrrr:ssss:tttt:uuuu:vvvv
 >   > got message of size 112 on Fri Sep 30 08:24:57 2022
 >   > #12: len 112, got message of size 120 on Fri Sep 30 08:24:57 2022
 >   > RTM_NEWADDR: address being added to iface: len 120, pid 1709, metric 0, addrflags: 0x40<AUTOCONF>
 >   > sockaddrs: 0x34<NETMASK,IFP,IFA>
 >   >  ffff:ffff:ffff:ffff:: aa:00:00:00:00:01 xxxx:yyyy:zzzz:rrrr:ssss:tttt:uuuu:vvvv
 >   > got message of size 112 on Fri Sep 30 08:26:58 2022
 >   
 >   So what is the life time of the addresses? Are you sure your network
 >   isn't forcing a renewal every minute?
 >   
 >   Joerg
 >   
 


Home | Main Index | Thread Index | Old Index