mirror of
https://github.com/systemd/systemd.git
synced 2025-01-11 09:18:07 +03:00
Merge pull request #28232 from rpigott/ndisc-captive-portal-mfree
ndisc: clear ndisc captive portal value on bogus zero-len option
This commit is contained in:
commit
c470513eea
@ -734,7 +734,7 @@ static int ndisc_router_process_captive_portal(Link *link, sd_ndisc_router *rt)
|
|||||||
return r;
|
return r;
|
||||||
|
|
||||||
if (len == 0) {
|
if (len == 0) {
|
||||||
mfree(link->ndisc_captive_portal);
|
link->ndisc_captive_portal = mfree(link->ndisc_captive_portal);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -743,7 +743,7 @@ static int ndisc_router_process_captive_portal(Link *link, sd_ndisc_router *rt)
|
|||||||
return r;
|
return r;
|
||||||
|
|
||||||
if (!in_charset(captive_portal, URI_VALID))
|
if (!in_charset(captive_portal, URI_VALID))
|
||||||
return -EINVAL;
|
return -EBADMSG;
|
||||||
|
|
||||||
if (!streq_ptr(link->ndisc_captive_portal, captive_portal)) {
|
if (!streq_ptr(link->ndisc_captive_portal, captive_portal)) {
|
||||||
free_and_replace(link->ndisc_captive_portal, captive_portal);
|
free_and_replace(link->ndisc_captive_portal, captive_portal);
|
||||||
|
Loading…
Reference in New Issue
Block a user