From 0319a28e42d91fd837f161a4c19113bbca70b4bd Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 22 Sep 2023 22:37:37 +0200 Subject: resolved: also expose interface index in server JSON data --- src/resolve/resolved-dns-server.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/resolve/resolved-dns-server.c') diff --git a/src/resolve/resolved-dns-server.c b/src/resolve/resolved-dns-server.c index f23e3f5db9..b7db83965b 100644 --- a/src/resolve/resolved-dns-server.c +++ b/src/resolve/resolved-dns-server.c @@ -1106,6 +1106,7 @@ int dns_server_dump_state_to_json(DnsServer *server, JsonVariant **ret) { JSON_BUILD_PAIR_STRING("Server", strna(dns_server_string_full(server))), JSON_BUILD_PAIR_STRING("Type", strna(dns_server_type_to_string(server->type))), JSON_BUILD_PAIR_CONDITION(server->type == DNS_SERVER_LINK, "Interface", JSON_BUILD_STRING(server->link ? server->link->ifname : NULL)), + JSON_BUILD_PAIR_CONDITION(server->type == DNS_SERVER_LINK, "InterfaceIndex", JSON_BUILD_UNSIGNED(server->link ? server->link->ifindex : 0)), JSON_BUILD_PAIR_STRING("VerifiedFeatureLevel", strna(dns_server_feature_level_to_string(server->verified_feature_level))), JSON_BUILD_PAIR_STRING("PossibleFeatureLevel", strna(dns_server_feature_level_to_string(server->possible_feature_level))), JSON_BUILD_PAIR_STRING("DNSSECMode", strna(dnssec_mode_to_string(dns_server_get_dnssec_mode(server)))), -- cgit v1.2.3