[RFC PATCH 00/14] odhcpd config value clamping

Christian Marangi ansuelsmth at gmail.com
Sat Nov 16 07:20:13 PST 2024


On Sun, Jun 30, 2024 at 10:32:42PM +0200, Paul D wrote:
> On 2024-05-10 00:30, Paul Donald wrote:
> > Clamp values read from config to RFC mandated sane values instead of just
> > complaining. We also now implement valid_lifetime for ULA prefixes.
> > This is useful if you need to sunset or remove one from circulation.
> > ( Interestingly, if you spin up dev devices frequently which spam the
> > network with new ULA each time, which have no expiry, interesting things
> > start to happen. )
> > Fixed also a bug in MTU handling.
> Any comments?
>

( no TOP post, I fixed it)

Generally changes are O.K. Just some formal change needed and some
additional info required. And as requested better to move the 2
requested change in separate patch so I can merge them right away.

I would ask you generally to produce better commit description and not
as a continuation of the title... Also declerative comments ("Change
that to foo" instead of "Here we add this change cause we really want to
make sure we change this with this single patch...")

>
>
> > 
> > Paul Donald (14):
> >   config: refactor parse_leasetime() - branch amount remains same
> >   router: Apply updated values from RFC8319 (updates RFC4861) to RA/ND
> >   config: clamp ra_mininterval, ra_maxinterval, ra_lifetime at load time
> >   router: refactor calc_ra_lifetime, and define ra_lifetime as uint32_t
> >   router: redefine ra_mininterval and ra_maxinterval as uint32_t
> >   config: implement RFC4861 AdvValidLifetime (make configurable)
> >   config: lease times are all UINT32_MAX; drop double size handling
> >   router: clamp prefix valid_lt to interface valid_lifetime
> >   config: clamp ra_reachabletime to RFC maximum (instead of complaining)
> >   config: clamp ra_hoplimit to maximum (instead of complaining)
> >   config: clamp ra_retranstime
> >   config: clamp ra_mtu into 1280-65535 range
> >   config: clamp dhcpv6_hostid_len
> >   config: clamp dhcpv6_pd_min_len
> > 
> >  README       |   2 +
> >  src/config.c | 162 +++++++++++++++++++++++++++++++++------------------
> >  src/odhcpd.h |   7 ++-
> >  src/router.c |  34 +++++------
> >  src/router.h |  25 +++++++-
> >  5 files changed, 148 insertions(+), 82 deletions(-)
> > 
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

-- 
	Ansuel



More information about the openwrt-devel mailing list