From: Zbigniew Jędrzejewski-Szmek Date: Tue, 5 May 2026 09:12:25 +0000 (+0200) Subject: resolve: enforce the search domain limit earlier (#41938) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d9d62f65864c2883ae5bf0364028048f20a224d;p=thirdparty%2Fsystemd.git resolve: enforce the search domain limit earlier (#41938) The search domain limit is already enforced by dns_search_domain_new(), but in this case it's way too late. Let's enforce it during the first loop to avoid unnecessary parsing. --- Also, set a similar limit for NTAs - introduce a new constant, since there's no pre-existing limit. I pulled the value from a thin air since there's (AFAIK) no mandated maximum/minimum for NTAs, but given they're supposed to be a manual and _temporary_ workarounds, hopefully 2K of NTAs will be more than enough (if not, please yell). Also note: the newly added error messages don't have the trailing "." and similarly the newly introduced constant doesn't have the "u" suffix to match the style of the surrounding code (and I didn't want to fix the surrounding code to make the diff minimal). If this is not desirable, please also yell. --- 2d9d62f65864c2883ae5bf0364028048f20a224d