1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-11 09:18:07 +03:00

ndisc: reject malformed captive portal URI with EBADMSG

This allows the correct, gracious, error handling to follow up in the
ndisc handler. Otherwise, an internal error is assumed and the interface
disabled.

Fixes: 9747955d2d ("ndisc: parse RFC8910 captive portal ipv6ra option")
This commit is contained in:
Ronan Pigott 2023-07-03 03:07:57 -07:00
parent 16290f50e9
commit 8231286faf

View File

@ -743,7 +743,7 @@ static int ndisc_router_process_captive_portal(Link *link, sd_ndisc_router *rt)
return r;
if (!in_charset(captive_portal, URI_VALID))
return -EINVAL;
return -EBADMSG;
if (!streq_ptr(link->ndisc_captive_portal, captive_portal)) {
free_and_replace(link->ndisc_captive_portal, captive_portal);