|
|
99be8f |
From c74a0bcb2e9c88b2ee166afc08574141a6a288b8 Mon Sep 17 00:00:00 2001
|
|
|
99be8f |
From: Andrea Claudi <aclaudi@redhat.com>
|
|
|
99be8f |
Date: Mon, 25 Mar 2019 13:30:43 +0100
|
|
|
99be8f |
Subject: [PATCH] lib: make resolve_hosts variable common
|
|
|
99be8f |
|
|
|
99be8f |
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1642479
|
|
|
99be8f |
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1641914
|
|
|
99be8f |
Upstream Status: iproute2.git commit 6648853975332
|
|
|
99be8f |
|
|
|
99be8f |
commit 6648853975332e5f34d03a1e2a6e09f5e1742099
|
|
|
99be8f |
Author: Ivan Vecera <ivecera@redhat.com>
|
|
|
99be8f |
Date: Fri Nov 10 07:20:13 2017 +0100
|
|
|
99be8f |
|
|
|
99be8f |
lib: make resolve_hosts variable common
|
|
|
99be8f |
|
|
|
99be8f |
Any iproute utility that uses any function from lib/utils.c needs
|
|
|
99be8f |
to declare its own resolve_hosts variable instance although it does
|
|
|
99be8f |
not need/use hostname resolving functionality (currently only 'ip'
|
|
|
99be8f |
and 'ss' commands uses this).
|
|
|
99be8f |
The patch declares single common instance of resolve_hosts directly
|
|
|
99be8f |
in utils.c so the existing ones can be removed (the same approach
|
|
|
99be8f |
that is used for timestamp_short).
|
|
|
99be8f |
|
|
|
99be8f |
Cc: Jiri Pirko <jiri@mellanox.com>
|
|
|
99be8f |
Cc: Arkadi Sharshevsky <arkadis@mellanox.com>
|
|
|
99be8f |
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
|
|
|
99be8f |
---
|
|
|
99be8f |
bridge/bridge.c | 1 -
|
|
|
99be8f |
genl/genl.c | 1 -
|
|
|
99be8f |
ip/ip.c | 1 -
|
|
|
99be8f |
ip/rtmon.c | 1 -
|
|
|
99be8f |
lib/utils.c | 1 +
|
|
|
99be8f |
misc/arpd.c | 2 --
|
|
|
99be8f |
misc/ss.c | 1 -
|
|
|
99be8f |
tc/tc.c | 1 -
|
|
|
99be8f |
8 files changed, 1 insertion(+), 8 deletions(-)
|
|
|
99be8f |
|
|
|
99be8f |
diff --git a/bridge/bridge.c b/bridge/bridge.c
|
|
|
99be8f |
index 5ff038d672ad2..6658cb8fd801d 100644
|
|
|
99be8f |
--- a/bridge/bridge.c
|
|
|
99be8f |
+++ b/bridge/bridge.c
|
|
|
99be8f |
@@ -18,7 +18,6 @@
|
|
|
99be8f |
|
|
|
99be8f |
struct rtnl_handle rth = { .fd = -1 };
|
|
|
99be8f |
int preferred_family = AF_UNSPEC;
|
|
|
99be8f |
-int resolve_hosts;
|
|
|
99be8f |
int oneline;
|
|
|
99be8f |
int show_stats;
|
|
|
99be8f |
int show_details;
|
|
|
99be8f |
diff --git a/genl/genl.c b/genl/genl.c
|
|
|
99be8f |
index 747074b029a7b..7e4a208d449f2 100644
|
|
|
99be8f |
--- a/genl/genl.c
|
|
|
99be8f |
+++ b/genl/genl.c
|
|
|
99be8f |
@@ -30,7 +30,6 @@
|
|
|
99be8f |
int show_stats = 0;
|
|
|
99be8f |
int show_details = 0;
|
|
|
99be8f |
int show_raw = 0;
|
|
|
99be8f |
-int resolve_hosts = 0;
|
|
|
99be8f |
|
|
|
99be8f |
static void *BODY;
|
|
|
99be8f |
static struct genl_util * genl_list;
|
|
|
99be8f |
diff --git a/ip/ip.c b/ip/ip.c
|
|
|
99be8f |
index 07050b07592ac..0c0ad1bde7cb6 100644
|
|
|
99be8f |
--- a/ip/ip.c
|
|
|
99be8f |
+++ b/ip/ip.c
|
|
|
99be8f |
@@ -30,7 +30,6 @@ int human_readable;
|
|
|
99be8f |
int use_iec;
|
|
|
99be8f |
int show_stats;
|
|
|
99be8f |
int show_details;
|
|
|
99be8f |
-int resolve_hosts;
|
|
|
99be8f |
int oneline;
|
|
|
99be8f |
int brief;
|
|
|
99be8f |
int timestamp;
|
|
|
99be8f |
diff --git a/ip/rtmon.c b/ip/rtmon.c
|
|
|
99be8f |
index 1c2981f79d3d1..94baa38e3b7cb 100644
|
|
|
99be8f |
--- a/ip/rtmon.c
|
|
|
99be8f |
+++ b/ip/rtmon.c
|
|
|
99be8f |
@@ -25,7 +25,6 @@
|
|
|
99be8f |
#include "utils.h"
|
|
|
99be8f |
#include "libnetlink.h"
|
|
|
99be8f |
|
|
|
99be8f |
-int resolve_hosts;
|
|
|
99be8f |
static int init_phase = 1;
|
|
|
99be8f |
|
|
|
99be8f |
static void write_stamp(FILE *fp)
|
|
|
99be8f |
diff --git a/lib/utils.c b/lib/utils.c
|
|
|
99be8f |
index 9f55391d3c1ea..fc9c575ba0c7d 100644
|
|
|
99be8f |
--- a/lib/utils.c
|
|
|
99be8f |
+++ b/lib/utils.c
|
|
|
99be8f |
@@ -35,6 +35,7 @@
|
|
|
99be8f |
#include "utils.h"
|
|
|
99be8f |
#include "namespace.h"
|
|
|
99be8f |
|
|
|
99be8f |
+int resolve_hosts;
|
|
|
99be8f |
int timestamp_short;
|
|
|
99be8f |
|
|
|
99be8f |
int get_hex(char c)
|
|
|
99be8f |
diff --git a/misc/arpd.c b/misc/arpd.c
|
|
|
99be8f |
index bfab44544ee1d..c9d86475e5995 100644
|
|
|
99be8f |
--- a/misc/arpd.c
|
|
|
99be8f |
+++ b/misc/arpd.c
|
|
|
99be8f |
@@ -38,8 +38,6 @@
|
|
|
99be8f |
#include "utils.h"
|
|
|
99be8f |
#include "rt_names.h"
|
|
|
99be8f |
|
|
|
99be8f |
-int resolve_hosts;
|
|
|
99be8f |
-
|
|
|
99be8f |
DB *dbase;
|
|
|
99be8f |
char *dbname = "/var/lib/arpd/arpd.db";
|
|
|
99be8f |
|
|
|
99be8f |
diff --git a/misc/ss.c b/misc/ss.c
|
|
|
99be8f |
index e92266539e6b5..c0cb33e96d9ec 100644
|
|
|
99be8f |
--- a/misc/ss.c
|
|
|
99be8f |
+++ b/misc/ss.c
|
|
|
99be8f |
@@ -89,7 +89,6 @@ static int security_get_initial_context(char *name, char **context)
|
|
|
99be8f |
}
|
|
|
99be8f |
#endif
|
|
|
99be8f |
|
|
|
99be8f |
-int resolve_hosts;
|
|
|
99be8f |
int resolve_services = 1;
|
|
|
99be8f |
int preferred_family = AF_UNSPEC;
|
|
|
99be8f |
int show_options;
|
|
|
99be8f |
diff --git a/tc/tc.c b/tc/tc.c
|
|
|
99be8f |
index 360c9f11c235b..11a364fabbbea 100644
|
|
|
99be8f |
--- a/tc/tc.c
|
|
|
99be8f |
+++ b/tc/tc.c
|
|
|
99be8f |
@@ -39,7 +39,6 @@ int show_graph;
|
|
|
99be8f |
int timestamp;
|
|
|
99be8f |
|
|
|
99be8f |
int batch_mode;
|
|
|
99be8f |
-int resolve_hosts;
|
|
|
99be8f |
int use_iec;
|
|
|
99be8f |
int force;
|
|
|
99be8f |
int ok;
|
|
|
99be8f |
--
|
|
|
99be8f |
2.20.1
|
|
|
99be8f |
|