You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
1.1 KiB
30 lines
1.1 KiB
From e5b40438543324acd504bbcf5d9b4cd71b46d931 Mon Sep 17 00:00:00 2001
|
|
From: Lennart Poettering <lennart@poettering.net>
|
|
Date: Wed, 4 Jan 2023 16:29:34 +0100
|
|
Subject: [PATCH] resolvectl: fix type of ifindex D-Bus field, and make sure to
|
|
initialize to zero in all code paths
|
|
|
|
(cherry picked from commit a5e6c8498ca375bafa865d5e46fa95e9313871ad)
|
|
|
|
Related: #2161260
|
|
---
|
|
src/resolve/resolvectl.c | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/resolve/resolvectl.c b/src/resolve/resolvectl.c
|
|
index c52773508f..2fd6c4914f 100644
|
|
--- a/src/resolve/resolvectl.c
|
|
+++ b/src/resolve/resolvectl.c
|
|
@@ -1208,9 +1208,10 @@ static int reset_server_features(int argc, char **argv, void *userdata) {
|
|
static int read_dns_server_one(sd_bus_message *m, bool with_ifindex, bool extended, char **ret) {
|
|
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
|
|
_cleanup_free_ char *pretty = NULL;
|
|
- int ifindex, family, r, k;
|
|
union in_addr_union a;
|
|
const char *name = NULL;
|
|
+ int32_t ifindex = 0;
|
|
+ int family, r, k;
|
|
uint16_t port = 0;
|
|
|
|
assert(m);
|