From: Ronan Pigott Date: Mon, 3 Jul 2023 10:07:57 +0000 (-0700) Subject: ndisc: reject malformed captive portal URI with EBADMSG X-Git-Tag: v254-rc1~46^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F28232%2Fhead;p=thirdparty%2Fsystemd.git 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: 9747955d2d60 ("ndisc: parse RFC8910 captive portal ipv6ra option") --- diff --git a/src/network/networkd-ndisc.c b/src/network/networkd-ndisc.c index 025deeff900..8115595dc5c 100644 --- a/src/network/networkd-ndisc.c +++ b/src/network/networkd-ndisc.c @@ -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);