From 516105d15686f1151f9d49acab5cf20738f14e82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radek=20Vok=C3=A1l?= Date: Tue, 1 Mar 2005 10:44:10 +0000 Subject: [PATCH] - behaviour of netstat -i option changed (#115987) - netstat -i shows all interface, -I only one --- net-tools-1.60-ifaceopt.patch | 52 +++++++++++++++++++++++++++++++++++ net-tools.spec | 8 +++++- 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 net-tools-1.60-ifaceopt.patch diff --git a/net-tools-1.60-ifaceopt.patch b/net-tools-1.60-ifaceopt.patch new file mode 100644 index 0000000..a561d07 --- /dev/null +++ b/net-tools-1.60-ifaceopt.patch @@ -0,0 +1,52 @@ +--- net-tools-1.60/netstat.c.ifaceopt 2005-03-01 12:11:43.695661632 +0100 ++++ net-tools-1.60/netstat.c 2005-03-01 12:16:37.601981080 +0100 +@@ -1658,10 +1658,11 @@ + { + fprintf(stderr, _("usage: netstat [-veenNcCF] [] -r netstat {-V|--version|-h|--help}\n")); + fprintf(stderr, _(" netstat [-vnNcaeol] [ ...]\n")); +- fprintf(stderr, _(" netstat { [-veenNac] -i[] | [-cnNe] -M | -s } [delay]\n\n")); ++ fprintf(stderr, _(" netstat { [-veenNac] -I[] | [-veenNac] -i | [-cnNe] -M | -s } [delay]\n\n")); + + fprintf(stderr, _(" -r, --route display routing table\n")); +- fprintf(stderr, _(" -i, --interfaces=[] display interface table\n")); ++ fprintf(stderr, _(" -I, --interfaces=[] display interface table for \n")); ++ fprintf(stderr, _(" -i, --interfaces display interface table\n")); + fprintf(stderr, _(" -g, --groups display multicast group memberships\n")); + fprintf(stderr, _(" -s, --statistics display networking statistics (like SNMP)\n")); + #if HAVE_FW_MASQUERADE +@@ -1700,7 +1701,8 @@ + { + AFTRANS_OPTS, + {"version", 0, 0, 'V'}, +- {"interfaces", 2, 0, 'i'}, ++ {"interfaces", 2, 0, 'I'}, ++ {"interfaces", 0, 0, 'i'}, + {"help", 0, 0, 'h'}, + {"route", 0, 0, 'r'}, + #if HAVE_FW_MASQUERADE +@@ -1738,7 +1740,8 @@ + getroute_init(); /* Set up AF routing support */ + + afname[0] = '\0'; +- while ((i = getopt_long(argc, argv, "MCFA:acdegphi::nNorstuVv?wxl", longopts, &lop)) != EOF) ++ ++ while ((i = getopt_long(argc, argv, "MCFA:acdegphiI::nNorstuVv?wxl", longopts, &lop)) != EOF) + switch (i) { + case -1: + break; +@@ -1779,11 +1782,14 @@ + case 'p': + flag_prg++; + break; +- case 'i': ++ case 'I': + if (optarg && strcmp(optarg, "(null)")) + flag_int_name = strdup(optarg); + flag_int++; + break; ++ case 'i': ++ flag_int++; ++ break; + case 'n': + flag_not |= FLAG_NUM; + break; diff --git a/net-tools.spec b/net-tools.spec index 67aae8a..89bf687 100644 --- a/net-tools.spec +++ b/net-tools.spec @@ -3,7 +3,7 @@ Summary: Basic networking tools. Name: net-tools Version: 1.60 -Release: 47 +Release: 48 License: GPL Group: System Environment/Base Source0: http://www.tazenda.demon.co.uk/phil/net-tools/net-tools-%{version}.tar.bz2 @@ -47,6 +47,7 @@ Patch34: net-tools-1.60-ifconfig_ib.patch Patch35: net-tools-1.60-de.patch Patch36: netplug-1.2.9-execshield.patch Patch37: net-tools-1.60-pie.patch +Patch38: net-tools-1.60-ifaceopt.patch BuildRoot: %{_tmppath}/%{name}-root Requires(post,preun): chkconfig @@ -92,6 +93,7 @@ ifconfig, netstat, route, and others. %patch35 -p1 %patch36 -p1 -b .execshield %patch37 -p1 -b .pie +%patch38 -p1 -b .ifaceopt cp %SOURCE2 ./config.h cp %SOURCE3 ./config.make @@ -195,6 +197,10 @@ exit 0 %{_sysconfdir}/rc.d/init.d/netplugd %changelog +* Tue Mar 01 2005 Radek Vokal 1.60-48 +- behaviour of netstat -i option changed (#115987) +- netstat -i shows all interface, -I only one + * Mon Feb 28 2005 Radek Vokal 1.60-47 - added RPM_OPT_FLAGS - execshield patch for netplug