]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Do not report an error if control_group is already set
authorQuentin Carbonneaux <quentin@c9x.me>
Tue, 5 May 2020 15:43:04 +0000 (17:43 +0200)
committerQuentin Carbonneaux <quentin@c9x.me>
Wed, 6 May 2020 21:30:38 +0000 (23:30 +0200)
src/if-options.c

index f2fb205bee7d25c195bbf94eb0b5c0310f31ee5b..aa21356386250b381e4dcad674dd8d2ca35e93e4 100644 (file)
@@ -2120,7 +2120,8 @@ invalid_token:
                        return -1;
                }
                if (grp == NULL) {
-                       logerrx("controlgroup: %s: not found", arg);
+                       if (!ctx->control_group)
+                               logerrx("controlgroup: %s: not found", arg);
                        free(p);
                        return -1;
                }
@@ -2129,7 +2130,8 @@ invalid_token:
 #else
                grp = getgrnam(arg);
                if (grp == NULL) {
-                       logerrx("controlgroup: %s: not found", arg);
+                       if (!ctx->control_group)
+                               logerrx("controlgroup: %s: not found", arg);
                        return -1;
                }
                ctx->control_group = grp->gr_gid;