NetBSD-Bugs archive

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

Re: bin/54997: dhcpcd does not set IPv6 default route



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

From: Roy Bixler <rcbixler%nyx.net@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: bin/54997: dhcpcd does not set IPv6 default route
Date: Fri, 6 Mar 2020 09:53:09 -0700

 This patch seems to fix the problem (otherwise, the behaviour I observe
 is that the first router advertisement received remains first):
 
 --- ipv6nd.c.orig       2020-02-27 16:50:52.476425174 +0000
 +++ ipv6nd.c    2020-03-06 16:43:18.730737671 +0000
 @@ -595,7 +595,7 @@
                         if (ipv6nd_rtpref(ra1) < ipv6nd_rtpref(ra2))
                                 continue;
                         /* All things being equal, prefer older routers. */
 -                       if (timespeccmp(&ra1->acquired, &ra2->acquired, >=))
 +                       if ((ipv6nd_rtpref(ra1) == ipv6nd_rtpref(ra2)) && (timespeccmp(&ra1->acquired, &ra2->acquired, >=)))
                                 continue;
                         TAILQ_INSERT_BEFORE(ra2, ra1, next);
                         break;
 
 -- 
 Roy Bixler <rcbixler%nyx.net@localhost>
 "The fundamental principle of science, the definition almost, is this: the
 sole test of the validity of any idea is experiment."
 -- Richard P. Feynman
 



Home | Main Index | Thread Index | Old Index