mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09: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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user