On Thu, Jun 16, 2022 at 02:36:28PM +0200, Claudio Jeker wrote: > This diff kills external use of prefixlen2mask() and uses inet4applymask() > instead. With this the IPv4 and IPv6 code is more similar. > Also I feel the code is a bit easier to read. > > Also kroute{,6}_match() is changed to take a struct bgpd_addr *. > This is another step towards removing lots of copy paste code.
I agree that it's easier to follow and cleaner after the diff. The tree you used to isn't quite up to date - there were some offsets. ok tb [...] > +const struct in_addr inet4allone = { INADDR_BROADCAST }; > +const struct in6_addr inet6allone = {{{ 0xff, 0xff, 0xff, 0xff, > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, > + 0xff, 0xff, 0xff, 0xff }}}; Any reason not to make these static?