]> git.feebdaed.xyz Git - 0xmirror/openssh-portable.git/commitdiff
upstream: don't set the PerSourceNetBlockSize IPv6 mask if sscanf
authordjm@openbsd.org <djm@openbsd.org>
Tue, 25 Nov 2025 00:52:00 +0000 (00:52 +0000)
committerDamien Miller <djm@mindrot.org>
Tue, 25 Nov 2025 00:52:27 +0000 (11:52 +1100)
didn't decode it. From Mingjie Shen via GHPR598

OpenBSD-Commit-ID: c722014e735cbd87adb2fa968ce4c47b43cf98b0

servconf.c

index 6d23c3686fb3fb5d1da90eae8149d9d75c27fc97..6cdfb3cb6814dd7e8423d01912942b0add9e195a 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: servconf.c,v 1.436 2025/11/20 05:10:56 dtucker Exp $ */
+/* $OpenBSD: servconf.c,v 1.437 2025/11/25 00:52:00 djm Exp $ */
 /*
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
  *                    All rights reserved
@@ -2044,7 +2044,8 @@ process_server_config_line_depth(ServerOptions *options, char *line,
                            filename, linenum, keyword);
                if (*activep && options->per_source_masklen_ipv4 == -1) {
                        options->per_source_masklen_ipv4 = value;
-                       options->per_source_masklen_ipv6 = value2;
+                       if (n == 2)
+                               options->per_source_masklen_ipv6 = value2;
                }
                break;