[PATCH] fw4: spelling fixes

2024-04-03 Thread Paul Donald
Signed-off-by: Paul Donald --- root/usr/share/ucode/fw4.uc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/root/usr/share/ucode/fw4.uc b/root/usr/share/ucode/fw4.uc index 551811a..6322a09 100644 --- a/root/usr/share/ucode/fw4.uc +++ b/root/usr/share/ucode/fw4.uc

[PATCH 2/5] dnsmasq: add handling of `cache-rr` to init script

2024-04-02 Thread Paul Donald
: ... --cache-rr= --cache-rr=A ... See https://forum.openwrt.org/t/resolving-query-type-65-to-local-address-for-ios-clients-in-dnsmasq/179504 Tested on: 23.05.2 Signed-off-by: Paul Donald --- package/network/services/dnsmasq/files/dnsmasq.init | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH 4/5] dnsmasq: quoted path variables

2024-04-02 Thread Paul Donald
Prevents problems when variables contain spaces. Tested on: 23.05.3 Signed-off-by: Paul Donald --- .../services/dnsmasq/files/dnsmasq.init | 32 +-- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b

[PATCH 1/5] dnsmasq: add handling of `filter-rr` to init script

2024-04-02 Thread Paul Donald
: ... --filter-A --filter-rr=A ... See https://forum.openwrt.org/t/resolving-query-type-65-to-local-address-for-ios-clients-in-dnsmasq/179504/23 Tested on: 23.05.2 Signed-off-by: Paul Donald Tested-by: Vladimir Kochkovski --- package/network/services/dnsmasq/files/dnsmasq.init | 2 ++ 1 file changed

[PATCH 3/5] dnsmasq: add 'extraconftext' parameter

2024-04-02 Thread Paul Donald
instances do not all inherit the same 'extraconftext'). See https://forum.openwrt.org/t/add-dnsmasq-custom-options-field-in-luci-gui/193184 Tested on: 23.05.3, 22.03.6 Signed-off-by: Paul Donald --- package/network/services/dnsmasq/files/dnsmasq.init | 10 -- 1 file changed, 8 insertions

[PATCH 5/5] dnsmasq: add handling of `dns-rr` to init script (add arbitrary resource records)

2024-04-02 Thread Paul Donald
on 22.03.5 Signed-off-by: Paul Donald --- package/network/services/dnsmasq/Makefile | 2 +- .../services/dnsmasq/files/dnsmasq.init | 23 +++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/package/network/services/dnsmasq/Makefile b/package/network

[PATCH] base-files: reduce IPv6 ULA prefix generation to a single call

2024-04-02 Thread Paul Donald
Tested on: 23.05.3 Signed-off-by: Paul Donald --- .../files/etc/uci-defaults/12_network-generate-ula | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/package/base-files/files/etc/uci-defaults/12_network-generate-ula b/package/base-files/files/etc/uci-defaults

[PATCH 5/7] lldpd: make capabilities advertisement controllable

2024-04-02 Thread Paul Donald
Defaults to off. Only available from >= 1.0.15 These capabilities are sent in TLV. Signed-off-by: Paul Donald --- package/network/services/lldpd/files/lldpd.init | 7 +++ 1 file changed, 7 insertions(+) diff --git a/package/network/services/lldpd/files/lldpd.init b/package/netw

[PATCH 2/7] lldpd: get_config_cid_ifaces() -> get_interface_csv_pattern()

2024-04-02 Thread Paul Donald
Make the function more generic. Can use it for not only 'config'. Now it can be used to parse interfaces for additional lldpd settings Tested on: 22.03.6 Signed-off-by: Paul Donald --- package/network/services/lldpd/files/lldpd.init | 8 1 file changed, 4 insertions(+), 4 deletions

[PATCH 7/7] lldpd: bump version

2024-04-02 Thread Paul Donald
3 -> 4 Signed-off-by: Paul Donald --- package/network/services/lldpd/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/network/services/lldpd/Makefile b/package/network/services/lldpd/Makefile index 18cdda33ce..5a9a9732d2 100644 --- a/package/network/servi

[PATCH 1/7] lldpd: fixed interface(s) parsing

2024-04-02 Thread Paul Donald
-o noglob` and `set +o noglob` to disable and enable globbing respectively, because when we pass `*` as an interface choice everything goes to hell without them. Tested extensively on: 22.03.6 Signed-off-by: Paul Donald --- .../network/services/lldpd/files/lldpd.init | 20 --- 1 fil

[PATCH 4/7] lldpd: note about capabilities

2024-04-02 Thread Paul Donald
only available from >= 1.0.15 Signed-off-by: Paul Donald --- package/network/services/lldpd/files/lldpd.init | 1 + 1 file changed, 1 insertion(+) diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init index 0334156fee..284c37c2ef 100

[PATCH 6/7] lldpd: make management address advertisement controllable

2024-04-02 Thread Paul Donald
Defaults to off. Available from >= 0.7.15 These are sent in TLV Signed-off-by: Paul Donald --- package/network/services/lldpd/files/lldpd.init | 6 ++ 1 file changed, 6 insertions(+) diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/fi

[PATCH 3/7] lldpd: fix restart

2024-04-02 Thread Paul Donald
] unknown command from argument 1: `/dev/null` 2024-03-16T20:39:00 [WARN/lldpctl] unknown command from argument 1: `/dev/null` 2024-03-16T20:39:00 [WARN/lldpctl] unknown command from argument 1: `/dev/null` Tested on: 22.03.6 Signed-off-by: Paul Donald --- package/network/services/lldpd/files

[PATCH 5/9] router: Limit prefix preferred_lt to valid_lt in accordance with RFC4861

2024-04-04 Thread Paul Donald
From: Paul Donald Follow-up fix for bc9d317f2921ae6b529f2c9f8de79b75992e206f https://www.rfc-editor.org/rfc/rfc4861#page-44 Signed-off-by: Paul Donald --- src/router.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/router.c b/src/router.c index 3890c0b..a1a7829 100644

[PATCH 6/9] router: Apply updated values from RFC8319 (updates RFC4861)

2024-04-04 Thread Paul Donald
From: Paul Donald https://www.rfc-editor.org/rfc/rfc8319#section-4 Signed-off-by: Paul Donald --- src/router.c | 6 -- src/router.h | 21 - 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/src/router.c b/src/router.c index a1a7829..4239aa8 100644

[PATCH 3/9] various: Comment fixes

2024-04-04 Thread Paul Donald
From: Paul Donald Signed-off-by: Paul Donald --- src/dhcpv4.c| 2 +- src/dhcpv6-ia.c | 6 +++--- src/netlink.c | 2 +- src/router.c| 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/dhcpv4.c b/src/dhcpv4.c index 3191ff2..cb0484f 100644 --- a/src/dhcpv4.c +++ b

[PATCH 1/9] various: refactor

2024-04-04 Thread Paul Donald
From: Paul Donald Refactor "preferred" (preferred what?) and "pref" (obscure) to "preferred_lt". It is now more difficult to conflate prefix, preference and other "pref" related terminology with preferred_lifetime. Signed-off-by

[PATCH 2/9] various: refactor

2024-04-04 Thread Paul Donald
From: Paul Donald Refactor "valid" (valid what?) to "valid_lt". Signed-off-by: Paul Donald --- src/dhcpv6-ia.c | 62 - src/dhcpv6.c| 4 ++-- src/dhcpv6.h| 4 ++-- src/netlink.c | 24 +-- src/odhc

[PATCH 8/9] router: Type comments

2024-04-04 Thread Paul Donald
From: Paul Donald Signed-off-by: Paul Donald --- src/router.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/router.c b/src/router.c index 4239aa8..c87fd39 100644 --- a/src/router.c +++ b/src/router.c @@ -668,7 +668,7 @@ static int send_router_advert(struct

[PATCH 9/9] ndp: Comments

2024-04-04 Thread Paul Donald
From: Paul Donald Signed-off-by: Paul Donald --- src/ndp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ndp.c b/src/ndp.c index dfbb111..0ec6fed 100644 --- a/src/ndp.c +++ b/src/ndp.c @@ -39,7 +39,7 @@ static void setup_addr_for_relaying(struct in6_addr *addr

[PATCH 0/9] odhcpd patchset

2024-04-04 Thread Paul Donald
From: Paul Donald refactor and fix limit prefix preferred_lt to valid_lt in accordance with RFC4861 Tested on 23.05.0 Paul Donald (9): various: refactor various: refactor various: Comment fixes router: inherit user-assigned preferred_lifetime router: Limit prefix preferred_lt

[PATCH 4/9] router: inherit user-assigned preferred_lifetime

2024-04-04 Thread Paul Donald
From: Paul Donald Inherit preferred_lifetime value irrespective of whether ra_useleasetime is set or not. User-provided values for preferred_lifetime are now assigned, instead of ignored. Signed-off-by: Paul Donald --- src/router.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions

[PATCH 7/9] config: ra_management is deprecated comment

2024-04-04 Thread Paul Donald
From: Paul Donald Signed-off-by: Paul Donald --- src/config.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/config.c b/src/config.c index 1cd4608..0368e74 100644 --- a/src/config.c +++ b/src/config.c @@ -892,6 +892,7 @@ int config_parse_interface(void *data, size_t len, const char

[PATCH v3 3/9] router: inherit user-assigned preferred_lifetime

2024-04-08 Thread Paul Donald
From: Paul Donald Inherit preferred_lifetime value irrespective of whether ra_useleasetime is set or not. User-provided values for preferred_lifetime are now assigned, instead of ignored. Before: == ICMPv6 Option (Prefix information : fd51:1c2a:8909::/64) Type: Prefix information (3

[PATCH v3 8/9] router: disambiguate and clarify 'no route' messages

2024-04-08 Thread Paul Donald
From: Paul Donald Signed-off-by: Paul Donald --- src/router.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/router.c b/src/router.c index 2a59530..365aaa8 100644 --- a/src/router.c +++ b/src/router.c @@ -656,9 +656,9 @@ static int send_router_advert(struct

[PATCH v2 0/7] lldpd: various improvements

2024-04-08 Thread Paul Donald
v2: applied feedback comments Paul Donald (7): lldpd: fixed interface(s) parsing lldpd: get_config_cid_ifaces() -> get_interface_csv_pattern() lldpd: fix restart lldpd: note about capabilities lldpd: make capabilities advertisement controllable lldpd: make management addr

[PATCH v2 2/7] lldpd: get_config_cid_ifaces() -> get_interface_csv_pattern()

2024-04-08 Thread Paul Donald
Make the function more generic. Can use it for not only 'config'. Now it can be used to parse interfaces for additional lldpd settings Tested on: 22.03.6 Signed-off-by: Paul Donald --- package/network/services/lldpd/files/lldpd.init | 8 1 file changed, 4 insertions(+), 4 deletions

[PATCH v2 1/7] lldpd: fixed interface(s) parsing

2024-04-08 Thread Paul Donald
and `set +o noglob` to disable and enable globbing respectively, because when we pass `*` as an interface choice everything goes to hell without them. Tested extensively on: 22.03.6 Signed-off-by: Paul Donald --- .../network/services/lldpd/files/lldpd.init | 20 --- 1 fil

[PATCH v2 3/7] lldpd: fix restart

2024-04-08 Thread Paul Donald
] unknown command from argument 1: `/dev/null` 2024-03-16T20:39:00 [WARN/lldpctl] unknown command from argument 1: `/dev/null` 2024-03-16T20:39:00 [WARN/lldpctl] unknown command from argument 1: `/dev/null` Tested on: 22.03.6 Signed-off-by: Paul Donald --- package/network/services/lldpd/files

[PATCH v2 4/7] lldpd: note about capabilities

2024-04-08 Thread Paul Donald
only available from >= 1.0.15 Comments are useful. Apparently this config parameter was committed when openwrt used an older version of lldpd which did not yet support it. Signed-off-by: Paul Donald --- package/network/services/lldpd/files/lldpd.init | 1 + 1 file changed, 1 insertion(+) d

[PATCH v2 5/7] lldpd: make capabilities advertisement controllable

2024-04-08 Thread Paul Donald
Defaults to off. Only available from >= 1.0.15 These capabilities are sent in TLV. Signed-off-by: Paul Donald --- package/network/services/lldpd/files/lldpd.init | 7 +++ 1 file changed, 7 insertions(+) diff --git a/package/network/services/lldpd/files/lldpd.init b/package/netw

[PATCH v2 7/7] lldpd: bump version

2024-04-08 Thread Paul Donald
3 -> 4 Signed-off-by: Paul Donald --- package/network/services/lldpd/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/network/services/lldpd/Makefile b/package/network/services/lldpd/Makefile index 18cdda33ce..5a9a9732d2 100644 --- a/package/network/servi

[PATCH v2 6/7] lldpd: make management address advertisement controllable

2024-04-08 Thread Paul Donald
Defaults to off. Available from >= 0.7.15 These are sent in TLV Signed-off-by: Paul Donald --- package/network/services/lldpd/files/lldpd.init | 6 ++ 1 file changed, 6 insertions(+) diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/fi

[PATCH v3 0/9] odhcpd patchset

2024-04-08 Thread Paul Donald
From: Paul Donald applies to odhcpd master HEAD d8118f6e76e5519881f9a37137c3a06b3cb60fd2 Before: == ICMPv6 Option (Prefix information : fd51:1c2a:8909::/64) Type: Prefix information (3) Length: 4 (32 bytes) Prefix Length: 64 Flag: 0xc0, On-link flag(L), Autonomous address

[PATCH v3 2/9] various: refactor valid -> valid_lt (lifetime)

2024-04-08 Thread Paul Donald
From: Paul Donald Refactor "valid" (valid what?) to "valid_lt". Signed-off-by: Paul Donald Reviewed-by: Daniel Golle --- src/dhcpv6-ia.c | 62 - src/dhcpv6.c| 4 ++-- src/dhcpv6.h| 4 ++-- src/netlink.c | 24

[PATCH v3 6/9] various: (formatting) convert spaces -> tabs

2024-04-08 Thread Paul Donald
From: Paul Donald Signed-off-by: Paul Donald --- src/config.c | 52 ++-- src/router.c | 32 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/src/config.c b/src/config.c index 0368e74..7fe31a1

[PATCH v3 1/9] various: refactor pref(erred) to preferred_lt (lifetime)

2024-04-08 Thread Paul Donald
From: Paul Donald Refactor "preferred" (preferred what?) and "pref" (obscure) to "preferred_lt". It is now more difficult to conflate prefix, preference and other "pref" related terminology with preferred_lifetime. Signed-off-by: Paul Donald Reviewe

[PATCH v3 7/9] router: rename minvalid -> lowest_found_lifetime

2024-04-08 Thread Paul Donald
From: Paul Donald The variable is used across all prefix lifetimes, serving as a low-tide mark. It stores the lowest lifetime among all prefixes. Signed-off-by: Paul Donald --- src/router.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/router.c b

[PATCH v3 5/9] various: Comment spell-fixes, new comments for extra clarification

2024-04-08 Thread Paul Donald
From: Paul Donald Signed-off-by: Paul Donald Reviewed-by: Daniel Golle --- src/config.c| 1 + src/dhcpv4.c| 2 +- src/dhcpv6-ia.c | 6 +++--- src/ndp.c | 4 ++-- src/netlink.c | 2 +- src/router.c| 6 +++--- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git

[PATCH v3 9/9] config: set RFC defaults for preferred lifetime

2024-04-08 Thread Paul Donald
From: Paul Donald set them in accordance with RFC4861 Signed-off-by: Paul Donald --- README | 2 +- src/config.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README b/README index 243ae24..c8f2eb4 100644 --- a/README +++ b/README @@ -116,7 +116,7 @@ domain

[PATCH v3 4/9] router: Limit prefix preferred_lt to valid_lt in accordance with RFC4861

2024-04-08 Thread Paul Donald
From: Paul Donald Follow-up fix for bc9d317f2921ae6b529f2c9f8de79b75992e206f https://www.rfc-editor.org/rfc/rfc4861#page-44 Signed-off-by: Paul Donald Reviewed-by: Daniel Golle --- src/router.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/router.c b/src/router.c index

[PATCH v2 1/9] various: refactor pref(erred) to preferred_lt (lifetime)

2024-04-05 Thread Paul Donald
From: Paul Donald Refactor "preferred" (preferred what?) and "pref" (obscure) to "preferred_lt". It is now more difficult to conflate prefix, preference and other "pref" related terminology with preferred_lifetime. Signed-off-by: Paul Donald Reviewe

[PATCH v2 0/9] odhcpd patchset

2024-04-05 Thread Paul Donald
From: Paul Donald applies to odhcpd master HEAD d8118f6e76e5519881f9a37137c3a06b3cb60fd2 Before: == ICMPv6 Option (Prefix information : fd51:1c2a:8909::/64) Type: Prefix information (3) Length: 4 (32 bytes) Prefix Length: 64 Flag: 0xc0, On-link flag(L), Autonomous address

[PATCH v2 2/9] various: refactor valid -> valid_lt (lifetime)

2024-04-05 Thread Paul Donald
From: Paul Donald Refactor "valid" (valid what?) to "valid_lt". Signed-off-by: Paul Donald Reviewed-by: Daniel Golle --- src/dhcpv6-ia.c | 62 - src/dhcpv6.c| 4 ++-- src/dhcpv6.h| 4 ++-- src/netlink.c | 24

[PATCH v2 6/9] router: Apply updated values from RFC8319 (updates RFC4861) to RA/ND

2024-04-05 Thread Paul Donald
From: Paul Donald https://www.rfc-editor.org/rfc/rfc8319#section-4 Signed-off-by: Paul Donald Reviewed-by: Daniel Golle --- src/router.c | 6 -- src/router.h | 21 - 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/src/router.c b/src/router.c index

[PATCH v2 8/9] router: DNSRecursiveDNS and DNSSearchOpt Type comments

2024-04-05 Thread Paul Donald
From: Paul Donald Signed-off-by: Paul Donald Reviewed-by: Daniel Golle --- src/router.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/router.c b/src/router.c index 4239aa8..c87fd39 100644 --- a/src/router.c +++ b/src/router.c @@ -668,7 +668,7 @@ static int

[PATCH v2 9/9] ndp: Comments (spelling)

2024-04-05 Thread Paul Donald
From: Paul Donald Signed-off-by: Paul Donald Reviewed-by: Daniel Golle --- src/ndp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ndp.c b/src/ndp.c index dfbb111..0ec6fed 100644 --- a/src/ndp.c +++ b/src/ndp.c @@ -39,7 +39,7 @@ static void

[PATCH v2 7/9] config: ra_management is deprecated comment

2024-04-05 Thread Paul Donald
From: Paul Donald Signed-off-by: Paul Donald Reviewed-by: Daniel Golle --- src/config.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/config.c b/src/config.c index 1cd4608..0368e74 100644 --- a/src/config.c +++ b/src/config.c @@ -892,6 +892,7 @@ int config_parse_interface(void *data

[PATCH v2 3/9] various: Comment spell-fixes and clarification

2024-04-05 Thread Paul Donald
From: Paul Donald Signed-off-by: Paul Donald Reviewed-by: Daniel Golle --- src/dhcpv4.c| 2 +- src/dhcpv6-ia.c | 6 +++--- src/netlink.c | 2 +- src/router.c| 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/dhcpv4.c b/src/dhcpv4.c index 3191ff2..cb0484f

[PATCH v2 4/9] router: inherit user-assigned preferred_lifetime

2024-04-05 Thread Paul Donald
From: Paul Donald Inherit preferred_lifetime value irrespective of whether ra_useleasetime is set or not. User-provided values for preferred_lifetime are now assigned, instead of ignored. Before: == ICMPv6 Option (Prefix information : fd51:1c2a:8909::/64) Type: Prefix information (3

[PATCH v2 5/9] router: Limit prefix preferred_lt to valid_lt in accordance with RFC4861

2024-04-05 Thread Paul Donald
From: Paul Donald Follow-up fix for bc9d317f2921ae6b529f2c9f8de79b75992e206f https://www.rfc-editor.org/rfc/rfc4861#page-44 Signed-off-by: Paul Donald Reviewed-by: Daniel Golle --- src/router.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/router.c b/src/router.c index

[RFC PATCH 1/1] config: use network interface 'dns_search' and dhcp 'domain'

2024-04-09 Thread Paul Donald
From: Paul Donald Now DNSSL Option 31 inherit the search list from an 'interface' also. ( A behaviour described in LuCI, but did not seem to exist before ). ICMPv6 Option (DNS Search List Option lan lalala) Type: DNS Search List Option (31) Length: 4 (32 bytes) Reserved

[RFC PATCH 0/1] odhcpd uses also interafce dns_search

2024-04-09 Thread Paul Donald
From: Paul Donald Applies to master d8118f6e76e5519881f9a37137c3a06b3cb60fd2 Na??ve implementation. Works well. Might have drawbacks: it parses interfaces, so if they happen to have the same parameter names, ??? The idea seems worth implementing. Paul Donald (1): config: use network

[RFC PATCH 11/14] config: clamp ra_retranstime

2024-05-09 Thread Paul Donald
From: Paul Donald Attempt to be helpful. Signed-off-by: Paul Donald --- src/config.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/config.c b/src/config.c index e0f2d80..160d7db 100644 --- a/src/config.c +++ b/src/config.c @@ -951,11 +951,10 @@ int

[RFC PATCH 12/14] config: clamp ra_mtu into 1280-65535 range

2024-05-09 Thread Paul Donald
From: Paul Donald (ipv6 packets can be up to 4GB in size...) The old logic had a logic error of || instead of && Signed-off-by: Paul Donald --- src/config.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/config.c b/src/config.c index 160d7db..f4eaa3

[RFC PATCH 04/14] router: refactor calc_ra_lifetime, and define ra_lifetime as uint32_t

2024-05-09 Thread Paul Donald
From: Paul Donald ra_lifetime no longer holds negative values, because we no longer do 'init' when we do calc_ra_lifetime. Signed-off-by: Paul Donald --- src/odhcpd.h | 2 +- src/router.c | 19 --- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/odhcpd.h b

[RFC PATCH 09/14] config: clamp ra_reachabletime to RFC maximum (instead of complaining)

2024-05-09 Thread Paul Donald
From: Paul Donald Attempt to be helpful. Signed-off-by: Paul Donald --- src/config.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/config.c b/src/config.c index 6b3cb01..54fb9b5 100644 --- a/src/config.c +++ b/src/config.c @@ -939,11 +939,13 @@ int

[RFC PATCH 00/14] odhcpd config value clamping

2024-05-09 Thread Paul Donald
ULA each time, which have no expiry, interesting things start to happen. ) Fixed also a bug in MTU handling. 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

[RFC PATCH 10/14] config: clamp ra_hoplimit to maximum (instead of complaining)

2024-05-09 Thread Paul Donald
From: Paul Donald Attempt to be helpful. Signed-off-by: Paul Donald --- src/config.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/config.c b/src/config.c index 54fb9b5..e0f2d80 100644 --- a/src/config.c +++ b/src/config.c @@ -961,11 +961,12 @@ int

[RFC PATCH 03/14] config: clamp ra_mininterval, ra_maxinterval, ra_lifetime at load time

2024-05-09 Thread Paul Donald
From: Paul Donald Signed-off-by: Paul Donald --- src/config.c | 48 +--- src/router.c | 10 -- src/router.h | 2 +- 3 files changed, 42 insertions(+), 18 deletions(-) diff --git a/src/config.c b/src/config.c index 346d74a..2ccf742 100644

[RFC PATCH 08/14] router: clamp prefix valid_lt to interface valid_lifetime

2024-05-09 Thread Paul Donald
From: Paul Donald Before: == ICMPv6 Option (Prefix information : fd26:3c30:a222::/64) Type: Prefix information (3) Length: 4 (32 bytes) Prefix Length: 64 Flag: 0xc0, On-link flag(L), Autonomous address-configuration flag(A) Valid Lifetime: Infinity (4294967295) Preferred

[RFC PATCH 07/14] config: lease times are all UINT32_MAX; drop double size handling

2024-05-09 Thread Paul Donald
From: Paul Donald This now prevents implicit 64 bit->32 bit truncation which may flag compiler errors later on down the road. All of the variables receiving from parse_leasetime() are uint32_t anyway, so max 136 years of valid lease time will have to suffice :) Signed-off-by: Paul Don

[RFC PATCH 02/14] router: Apply updated values from RFC8319 (updates RFC4861) to RA/ND

2024-05-09 Thread Paul Donald
From: Paul Donald https://www.rfc-editor.org/rfc/rfc8319#section-4 Signed-off-by: Paul Donald --- src/router.c | 6 -- src/router.h | 23 ++- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/src/router.c b/src/router.c index 7f5658b..ae0c545 100644

[RFC PATCH 01/14] config: refactor parse_leasetime() - branch amount remains same

2024-05-09 Thread Paul Donald
From: Paul Donald Also make 's' value a noop. Signed-off-by: Paul Donald --- src/config.c | 20 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/config.c b/src/config.c index 62d4857..346d74a 100644 --- a/src/config.c +++ b/src/config.c @@ -356,18

[RFC PATCH 05/14] router: redefine ra_mininterval and ra_maxinterval as uint32_t

2024-05-09 Thread Paul Donald
From: Paul Donald They never store negative values. Signed-off-by: Paul Donald --- src/config.c | 6 +++--- src/odhcpd.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/config.c b/src/config.c index 2ccf742..a3bf1ba 100644 --- a/src/config.c +++ b/src/config.c

[RFC PATCH 06/14] config: implement RFC4861 AdvValidLifetime (make configurable)

2024-05-09 Thread Paul Donald
From: Paul Donald In accordance with RFC4861. Enables control of ULA. The new config variable is valid_lifetime. e.g.: config dhcp 'lan' ... option valid_lifetime '6h' Signed-off-by: Paul Donald --- README | 2 ++ src/config.c | 14 ++ src/odhcpd.h | 1

[RFC PATCH 13/14] config: clamp dhcpv6_hostid_len

2024-05-09 Thread Paul Donald
From: Paul Donald Attempt to be helpful. Signed-off-by: Paul Donald --- src/config.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/config.c b/src/config.c index f4eaa3b..4d35548 100644 --- a/src/config.c +++ b/src/config.c @@ -896,11 +896,12 @@ int

[RFC PATCH 14/14] config: clamp dhcpv6_pd_min_len

2024-05-09 Thread Paul Donald
From: Paul Donald Attempt to be helpful. Signed-off-by: Paul Donald --- src/config.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/config.c b/src/config.c index 4d35548..7484519 100644 --- a/src/config.c +++ b/src/config.c @@ -883,11 +883,11 @@ int