platform/upstream/net-tools.git
7 years agoMerge "Modified license using SPDX license identifier" into tizen accepted/tizen_common tizen accepted/tizen/common/20160921.162558 submit/tizen/20160921.025733 submit/tizen/20160921.055232
cheoleun moon [Wed, 21 Sep 2016 02:09:34 +0000 (19:09 -0700)]
Merge "Modified license using SPDX license identifier" into tizen

7 years agoModified license using SPDX license identifier 00/88600/1
Seonah Moon [Tue, 20 Sep 2016 02:42:43 +0000 (11:42 +0900)]
Modified license using SPDX license identifier

Change-Id: Id7e8978e31eeef325026928dfc37be199b315706
Signed-off-by: Seonah Moon <seonah1.moon@samsung.com>
8 years agoMerge "packaging: Fix License name to match SPDX" into tizen
taesub kim [Tue, 22 Dec 2015 05:55:09 +0000 (21:55 -0800)]
Merge "packaging: Fix License name to match SPDX" into tizen

8 years agopackaging: Fix License name to match SPDX 72/48072/1
Philippe Coval [Sat, 12 Sep 2015 23:29:06 +0000 (01:29 +0200)]
packaging: Fix License name to match SPDX

Change-Id: If13d10ca46b5203537882f5eae52323ef46a8fcf
Signed-off-by: Philippe Coval <philippe.coval.pro@gmail.com>
8 years agoThis patch adds displaying of Smack labels for Unix sockets 81/43381/4
Zbigniew Jasinski [Wed, 8 Jul 2015 11:54:33 +0000 (13:54 +0200)]
This patch adds displaying of Smack labels for Unix sockets

Signed-off-by: Zbigniew Jasinski <z.jasinski@samsung.com>
Change-Id: I56ace2833d254197680c2d68a87cd2f4569e7ae7

10 years agoresetting manifest requested domain to floor 20/5220/1 accepted/tizen/ivi/genivi accepted/tizen/ivi/stable accepted/tizen_3.0.2014.q3_common accepted/tizen_3.0.m14.3_ivi accepted/tizen_3.0.m2_base accepted/tizen_3.0_base accepted/tizen_3.0_ivi accepted/tizen_4.0_base accepted/tizen_5.0_base accepted/tizen_5.5_base accepted/tizen_5.5_base_mobile_hotfix accepted/tizen_5.5_base_wearable_hotfix accepted/tizen_generic accepted/tizen_ivi accepted/tizen_mobile accepted/tizen_tv accepted/tizen_wearable tizen_3.0 tizen_3.0.2014.q3_common tizen_3.0.2014.q4_common tizen_3.0.2015.q1_common tizen_3.0.2015.q2_common tizen_3.0.m14.2_ivi tizen_3.0.m14.3_ivi tizen_3.0.m1_mobile tizen_3.0.m1_tv tizen_3.0.m2_base tizen_3.0_base tizen_3.0_ivi tizen_4.0_base tizen_4.0_tv tizen_5.0_base tizen_5.5_base tizen_5.5_base_mobile_hotfix tizen_5.5_base_wearable_hotfix tizen_5.5_tv tizen_ivi_genivi accepted/tizen/20130710.215415 accepted/tizen/20130912.153326 accepted/tizen/20130912.191023 accepted/tizen/20130912.195228 accepted/tizen/3.0.m2/base/20170104.081849 accepted/tizen/3.0/base/20161028.103002 accepted/tizen/4.0/base/20170811.092657 accepted/tizen/4.0/base/20170828.221039 accepted/tizen/5.0/base/20181101.090329 accepted/tizen/5.5/base/20191030.082002 accepted/tizen/5.5/base/mobile/hotfix/20201023.084404 accepted/tizen/5.5/base/wearable/hotfix/20201023.080803 accepted/tizen/base/20151223.052210 accepted/tizen/ivi/genivi/20140131.034712 ivi_oct_m2 submit/tizen/20130710.133432 submit/tizen/20130912.080149 submit/tizen/20130912.090456 submit/tizen_3.0.m2_base/20170104.073748 submit/tizen_3.0_base/20161028.062323 submit/tizen_4.0_base/20170811.071500 submit/tizen_4.0_base/20170828.000000 submit/tizen_4.0_base/20170828.000001 submit/tizen_5.0_base/20181101.000001 submit/tizen_5.5_base/20191030.000001 submit/tizen_5.5_base_mobile_hotfix/20201023.171501 submit/tizen_5.5_base_wearable_hotfix/20201023.155601 submit/tizen_base/20151223.111112 submit/tizen_common/20151015.190624 submit/tizen_common/20151019.135620 submit/tizen_common/20151023.083358 submit/tizen_common/20151026.085049 submit/tizen_ivi_genivi/20140131.030431 submit/tizen_mobile/20141120.000000 tizen_3.0.2014.q3_common_release tizen_3.0.m14.2_ivi_release tizen_3.0.m14.3_ivi_release tizen_3.0.m1_mobile_release tizen_3.0.m1_tv_release tizen_3.0.m2.a1_mobile_release tizen_3.0.m2.a1_tv_release tizen_3.0_ivi_release tizen_4.0.IoT.p1_release tizen_4.0.IoT.p2_release tizen_4.0.m1_release tizen_4.0.m2_release tizen_5.5.m2_release
Alexandru Cornea [Mon, 1 Jul 2013 17:46:39 +0000 (20:46 +0300)]
resetting manifest requested domain to floor

11 years agocleanup spec accepted/tizen/20130503.230005 accepted/tizen/20130520.100237 accepted/trunk/20121215.002401 accepted/trunk/20130325.213132 submit/tizen/20130503.230606 submit/tizen/20130509.182518 submit/tizen/20130517.023511 submit/trunk/20121214.175021 submit/trunk/20130325.083636
Anas Nashif [Fri, 14 Dec 2012 17:48:43 +0000 (09:48 -0800)]
cleanup spec

11 years agocleanup spec accepted/trunk/20121214.175514 submit/trunk/20121214.174557 submit/trunk/20121214.174603
Anas Nashif [Fri, 14 Dec 2012 17:45:45 +0000 (09:45 -0800)]
cleanup spec

11 years agomove netstat to /usr/bin accepted/trunk/20121214.171541 submit/trunk/20121214.171530
Anas Nashif [Fri, 14 Dec 2012 17:15:09 +0000 (09:15 -0800)]
move netstat to /usr/bin

11 years agoadd changelog accepted/trunk/20121214.165330 submit/trunk/20121214.155951
Anas Nashif [Fri, 14 Dec 2012 15:43:49 +0000 (07:43 -0800)]
add changelog

11 years agoBump version to 2.0
Anas Nashif [Sun, 9 Dec 2012 19:12:54 +0000 (11:12 -0800)]
Bump version to 2.0

11 years agoSome more fixes for german arp.8 upstream upstream/1.99_20121209git upstream/2.0_20121208git
Bernd Eckenfels [Wed, 17 Oct 2012 20:05:59 +0000 (20:05 +0000)]
Some more fixes for german arp.8

11 years agoUse groff umlaut
Bernd Eckenfels [Wed, 17 Oct 2012 19:40:40 +0000 (19:40 +0000)]
Use groff umlaut

11 years agoRemove trailing linefeeds from arp.8 man pages
Bernd Eckenfels [Wed, 17 Oct 2012 19:33:35 +0000 (19:33 +0000)]
Remove trailing linefeeds from arp.8 man pages

11 years agoarp(8): German translation updated + corrected, en: missing ) added
Simon A. Eugster [Sun, 14 Oct 2012 18:57:38 +0000 (20:57 +0200)]
arp(8): German translation updated + corrected, en: missing ) added

11 years agoarp(8): part of a sentence was missing
Jiri Popelka [Thu, 4 Oct 2012 10:38:31 +0000 (12:38 +0200)]
arp(8): part of a sentence was missing

also fix fonts of some keywords

11 years agoupdate the dist target and add a distcheck target
Mike Frysinger [Wed, 3 Oct 2012 02:18:10 +0000 (22:18 -0400)]
update the dist target and add a distcheck target

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
11 years agodisable old features by default
Mike Frysinger [Mon, 1 Oct 2012 05:40:43 +0000 (01:40 -0400)]
disable old features by default

These features have been removed in recent kernels (and no longer provide
the headers so we can't compile against them), so disable by default.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
11 years agoslattach: pass up exit status of shell command
Mike Frysinger [Mon, 1 Oct 2012 05:38:11 +0000 (01:38 -0400)]
slattach: pass up exit status of shell command

This is partially to fix a build warning:
slattach.c: In function 'main':
slattach.c:771:9: warning: ignoring return value of 'system',
declared with attribute warn_unused_result [-Wunused-result]

And partially because I think it's the right thing to do.  Otherwise
there's no way for people to check the exit status of the command they
told slattach to run.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
11 years agoDeprecated netstat, made usage with --inet/--inet6 clear.
Bernd Eckenfels [Sat, 15 Sep 2012 19:51:51 +0000 (19:51 +0000)]
Deprecated netstat, made usage with --inet/--inet6 clear.

11 years agoMinor cleanup of netstat usage()
Bernd Eckenfels [Sat, 15 Sep 2012 19:27:53 +0000 (19:27 +0000)]
Minor cleanup of netstat usage()

11 years agoRemoved code duplication (Sourceforege#3567952 reported by hugh redelmeier)
Bernd Eckenfels [Sat, 15 Sep 2012 17:06:10 +0000 (17:06 +0000)]
Removed code duplication (Sourceforege#3567952 reported by hugh redelmeier)

11 years agonetstat memory leak fixed.
Jiri Popelka [Fri, 29 Jun 2012 08:04:58 +0000 (10:04 +0200)]
netstat memory leak fixed.

valgrind --leak-check=full netstat
(x86_64)

before:
  definitely lost: 1,536 bytes in 64 blocks
  indirectly lost: 479 bytes in 64 blocks
 ERROR SUMMARY: 1 errors from 1 contexts

after:
  definitely lost: 0 bytes in 0 blocks
  indirectly lost: 0 bytes in 0 blocks
 ERROR SUMMARY: 0 errors from 0 contexts

11 years agoiptunnel.c: avoid fd leak in case of ioctl() error
Jiri Popelka [Thu, 21 Jun 2012 11:33:18 +0000 (13:33 +0200)]
iptunnel.c: avoid fd leak in case of ioctl() error

11 years agouse scanf("%ms") instead of scanf("%as") for dynamic string
Jiri Popelka [Thu, 21 Jun 2012 13:51:05 +0000 (15:51 +0200)]
use scanf("%ms") instead of scanf("%as") for dynamic string

from scanf(3):
The a modifier is not available if the program is compiled with
gcc -std=c99 or gcc -D_ISOC99_SOURCE (unless _GNU_SOURCE
is also specified), in which case the a is interpreted
as a specifier for floating-point numbers (see above).

Since version 2.7, glibc also provides the m modifier for the
same purpose as the a modifier. The m modifier has the following
advantages:
* It may also be applied to %c conversion specifiers (e.g., %3mc).
* It avoids ambiguity with respect to the %a floating-point
  conversion specifier (and is unaffected by gcc -std=c99 etc.)
* It is specified in the upcoming revision of the POSIX.1 standard.

11 years agoConsistently use defined exit codes.
Jiri Popelka [Thu, 21 Jun 2012 09:30:22 +0000 (11:30 +0200)]
Consistently use defined exit codes.

Tools have been inconsistently using exit codes when started with
--help/--version.
With this patch all tools use exit codes E_USAGE/E_VERSION defined
in net-support.h.

There's probably no rule what exit codes should programs use when
started with --help/--version, but when I'm checking programs on
my system most of them use 0 (SUCCESS) exit code.
Therefore I redefined E_USAGE/E_VERSION to EXIT_SUCCESS (0).

11 years agoarp(8): fixed one more typo (simplyfy -> simplify)
Jiri Popelka [Tue, 1 May 2012 18:12:03 +0000 (20:12 +0200)]
arp(8): fixed one more typo (simplyfy -> simplify)

11 years agoarp(8): fixed typo (priveledge -> privilege)
Jiri Popelka [Tue, 1 May 2012 17:51:15 +0000 (19:51 +0200)]
arp(8): fixed typo (priveledge -> privilege)

Ubuntu bug #992204

12 years agoFixed 2 SELinux related compiler warnings.
Jiri Popelka [Mon, 23 Jan 2012 13:05:12 +0000 (14:05 +0100)]
Fixed 2 SELinux related compiler warnings.

12 years agoRemoved SET and GET of interface metrics
Jiri Popelka [Fri, 20 Jan 2012 12:52:12 +0000 (13:52 +0100)]
Removed SET and GET of interface metrics

https://sourceforge.net/mailarchive/message.php?msg_id=28701120

12 years agoifconfig(8): fix tunnel option syntax
Jiri Popelka [Thu, 19 Jan 2012 11:25:35 +0000 (12:25 +0100)]
ifconfig(8): fix tunnel option syntax

The destination is not just the ipv4 address but the
ipv6 address notation for the ipv4 address.

12 years agoinfiniband: fix up new warning message
Mike Frysinger [Fri, 13 Jan 2012 18:55:36 +0000 (13:55 -0500)]
infiniband: fix up new warning message

This causes a build warning (since the string isn't const), and the
message lacks a new line.  Fix both in one go.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agoMake netstat -h and -V honor HAVE_SELINUX
Bernd Eckenfels [Sat, 21 Jan 2012 01:32:07 +0000 (01:32 +0000)]
Make netstat -h and -V honor HAVE_SELINUX

12 years agoremoved unused variable
Bernd Eckenfels [Sat, 21 Jan 2012 00:56:15 +0000 (00:56 +0000)]
removed unused variable

12 years agonew option for nestat, -Z shows SELinux context
Jiri Popelka [Mon, 16 Jan 2012 14:34:09 +0000 (15:34 +0100)]
new option for nestat, -Z shows SELinux context

Patch by Dan Walsh.

12 years agoMake the code style consistent across netstat.c
Jiri Popelka [Mon, 16 Jan 2012 14:13:21 +0000 (15:13 +0100)]
Make the code style consistent across netstat.c

12 years agoman/de_DE/arp.8 fix translation (RHBZ#322901)
Jiri Popelka [Fri, 13 Jan 2012 14:50:51 +0000 (15:50 +0100)]
man/de_DE/arp.8 fix translation (RHBZ#322901)

12 years agoman/pt_BR/ifconfig.8: remove untranslated paragraph
Jiri Popelka [Fri, 13 Jan 2012 14:50:56 +0000 (15:50 +0100)]
man/pt_BR/ifconfig.8: remove untranslated paragraph

12 years agoroute(8): note that 'route mss' actually sets MTU (RHBZ#680837)
Jiri Popelka [Fri, 13 Jan 2012 14:50:55 +0000 (15:50 +0100)]
route(8): note that 'route mss' actually sets MTU (RHBZ#680837)

12 years agoifconfig(8): note about supported format for IPv4 addresses (RHBZ#176661)
Jiri Popelka [Fri, 13 Jan 2012 14:50:54 +0000 (15:50 +0100)]
ifconfig(8): note about supported format for IPv4 addresses (RHBZ#176661)

12 years agoifconfig(8), netstat(8): mention iptables instead of ipchains, ipfwadm or ipfw.
Jiri Popelka [Fri, 13 Jan 2012 14:50:53 +0000 (15:50 +0100)]
ifconfig(8), netstat(8): mention iptables instead of ipchains, ipfwadm or ipfw.

12 years agoifconfig(8): do not mention /proc/net/socket (RHBZ#661905)
Jiri Popelka [Fri, 13 Jan 2012 14:50:52 +0000 (15:50 +0100)]
ifconfig(8): do not mention /proc/net/socket (RHBZ#661905)

12 years agoWarn about changed encoding of man pages
Bernd Eckenfels [Thu, 12 Jan 2012 12:01:06 +0000 (12:01 +0000)]
Warn about changed encoding of man pages

12 years agoConvert latin1 characters to UTF-8
Bernd Eckenfels [Thu, 12 Jan 2012 11:52:51 +0000 (11:52 +0000)]
Convert latin1 characters to UTF-8

12 years agoinform user that ifconfig can correctly show only first 8 bytes of Infiniband hw...
Jiri Popelka [Thu, 5 Jan 2012 16:01:05 +0000 (17:01 +0100)]
inform user that ifconfig can correctly show only first 8 bytes of Infiniband hw address

12 years agomii-tool: don't rely on eth0 being default network device name.
Jiri Popelka [Thu, 5 Jan 2012 15:28:45 +0000 (16:28 +0100)]
mii-tool: don't rely on eth0 being default network device name.

With this patch mii-tool requires interface name
to be specified as argument.

12 years agomii-tool: use <linux/mii.h> instead of "mii.h" and fix RHBZ #491358
Jiri Popelka [Thu, 5 Jan 2012 13:53:49 +0000 (14:53 +0100)]
mii-tool: use <linux/mii.h> instead of "mii.h" and fix RHBZ #491358

Using mii-tool with e1000e driver results in:
SIOCGMIIREG on eth0 failed: Input/output error

Problem is in show_basic_mii() where the loop
    for (i = 0; i < ((verbose > 1) ? 32 : MII_BASIC_MAX); i++)
        mii_val[i] = mdio_read(sock, i);
checks all MII registers from 0x00 to 0x07 (or to 0x1F in verbose mode).
But there's no register with 0x07 value.

For more details see:
https://bugzilla.redhat.com/show_bug.cgi?id=491358#c1

Solution is to check only defined MII registers.

Also the "mii.h" is actually a duplicate of <linux/mii.h>.

12 years agoPossible problems found by static analysis of code.
Jiri Popelka [Wed, 7 Dec 2011 18:43:56 +0000 (19:43 +0100)]
Possible problems found by static analysis of code.

We analyzed the net-tools-1.60 code with Coverity.
Coverity is commercial enterprise level tool for
static analysis (analysis based only on compiling
of sources, not based on running of binary) of the code.

This change should fix some possible problems like resource (memory,
file descriptors) leaks.

Follow respective parts of the scan log. The line
numbers could be quite different as we analyzed Red Hat's
heavily patched version of net-tools-1.60.

Error: RESOURCE_LEAK
ipmaddr.c:191: alloc_fn: Calling allocation function "malloc".
ipmaddr.c:191: var_assign: Assigning: "ma" =  storage returned from "malloc(sizeof (m) /*64*/)".
ipmaddr.c:203: overwrite_var: Overwriting "ma" in call "ma = malloc(sizeof (m) /*64*/)" leaks the storage that "ma" points to.

Error: RESOURCE_LEAK
iptunnel.c:473: alloc_fn: Calling allocation function "fopen".
iptunnel.c:473: var_assign: Assigning: "fp" =  storage returned from "fopen("/proc/net/dev", "r")".
iptunnel.c:488: leaked_storage: Variable "fp" going out of scope leaks the storage it points to.
iptunnel.c:524: leaked_storage: Variable "fp" going out of scope leaks the storage it points to.

Error: FORWARD_NULL
lib/inet.c:408: var_compare_op: Comparing "item" to null implies that "item" might be null.
lib/inet.c:410: var_deref_op: Dereferencing null variable "item".

Error: RESOURCE_LEAK
lib/masq_info.c:174: alloc_fn: Calling allocation function "malloc".
lib/masq_info.c:174: var_assign: Assigning: "mslist" =  storage returned from "malloc(1152UL)".
lib/masq_info.c:215: leaked_storage: Variable "mslist" going out of scope leaks the storage it points to.

Error: RESOURCE_LEAK
lib/netrom_gr.c:35: alloc_fn: Calling allocation function "fopen".
lib/netrom_gr.c:35: var_assign: Assigning: "f1" =  storage returned from "fopen("/proc/net/nr_nodes", "r")".
lib/netrom_gr.c:42: overwrite_var: Overwriting "f1" in call "f1 = fopen("/proc/net/nr_nodes", "r")" leaks the storage that "f1" points to.

Error: RESOURCE_LEAK
lib/netrom_gr.c:36: alloc_fn: Calling allocation function "fopen".
lib/netrom_gr.c:36: var_assign: Assigning: "f2" =  storage returned from "fopen("/proc/net/nr_neigh", "r")".
lib/netrom_gr.c:44: overwrite_var: Overwriting "f2" in call "f2 = fopen("/proc/net/nr_neigh", "r")" leaks the storage that "f2" points to

Error: FORWARD_NULL
lib/x25.c:101: var_compare_op: Comparing "p" to null implies that "p" might be null.
lib/x25.c:109: var_deref_op: Dereferencing null variable "p".

Error: RESOURCE_LEAK
nameif.c:166: alloc_fn: Calling allocation function "xmalloc".
nameif.c:166: var_assign: Assigning: "ch" =  storage returned from "xmalloc(sizeof (struct change) /*40*/)".
nameif.c:177: leaked_storage: Variable "ch" going out of scope leaks the storage it points to.

Error: NEGATIVE_RETURNS
netstat.c:463: negative_return_fn: Function "readlink(line, lname, 29UL)" returns a negative number.
netstat.c:463: var_assign: Assigning: signed variable "lnamelen" = "readlink".
netstat.c:464: negative_returns: Using variable "lnamelen" as an index to array "lname".

Error: RESOURCE_LEAK
netstat.c:894: alloc_fn: Calling allocation function "fopen".
netstat.c:894: var_assign: Assigning: "f" =  storage returned from "fopen("/proc/net/x25", "r")".
netstat.c:905: overwrite_var: Overwriting "f" in call "f = fopen("/proc/net/x25", "r")" leaks the storage that "f" points to.

Error: RESOURCE_LEAK
netstat.c:1916: alloc_fn: Calling allocation function "fopen".
netstat.c:1916: var_assign: Assigning: "f" =  storage returned from "fopen("/proc/net/ipx", "r")".
netstat.c:1934: leaked_storage: Variable "f" going out of scope leaks the storage it points to.
netstat.c:1947: leaked_storage: Variable "f" going out of scope leaks the storage it points to.
netstat.c:1957: leaked_storage: Variable "f" going out of scope leaks the storage it points to.

12 years agoplipconfig man page and usage output fixes
Jiri Popelka [Wed, 7 Dec 2011 18:21:29 +0000 (19:21 +0100)]
plipconfig man page and usage output fixes

12 years agoifconfig interface:0 del <IP> will remove the aliased IP on IA64
Jiri Popelka [Wed, 7 Dec 2011 18:14:09 +0000 (19:14 +0100)]
ifconfig interface:0 del <IP> will remove the aliased IP on IA64

12 years agoprevent 'netstat -nr -A inet6' from smashing stack (RHBZ #668047)
Jiri Popelka [Wed, 7 Dec 2011 18:10:11 +0000 (19:10 +0100)]
prevent 'netstat -nr -A inet6' from smashing stack (RHBZ #668047)

12 years agofixed clearing flags in ifconfig (RHBZ #450252)
Jiri Popelka [Wed, 7 Dec 2011 18:04:35 +0000 (19:04 +0100)]
fixed clearing flags in ifconfig (RHBZ #450252)

12 years agonameif crash for long interface names (RHBZ #209120)
Jiri Popelka [Wed, 7 Dec 2011 18:02:07 +0000 (19:02 +0100)]
nameif crash for long interface names (RHBZ #209120)

I'm not sure how to reproduce that, but the patch
is quite straightforward.

12 years agoin kernel 2.6 /proc/net/x25_routes moves to /proc/net/x25/route
Jiri Popelka [Wed, 7 Dec 2011 17:53:28 +0000 (18:53 +0100)]
in kernel 2.6 /proc/net/x25_routes moves to /proc/net/x25/route

12 years agobuffer overflow in arp (RHBZ #164695)
Jiri Popelka [Wed, 7 Dec 2011 17:43:03 +0000 (18:43 +0100)]
buffer overflow in arp (RHBZ #164695)

Steps to Reproduce:
1. arp -s 172.16.1.3 00:80:c8:04:05:06 -D eth0

12 years agonetstat -s reports negative octet counts
Jiri Popelka [Wed, 7 Dec 2011 17:22:17 +0000 (18:22 +0100)]
netstat -s reports negative octet counts

(RHBZ #579854, Debian #561161)

original patch from Sami Farin

12 years agoThe return value of nameif was wrong
Jiri Popelka [Wed, 7 Dec 2011 17:16:09 +0000 (18:16 +0100)]
The return value of nameif was wrong

Steps to Reproduce:
/sbin/nameif eth1 00:00:10:10:11:11; echo $?

Actual Results:
interface 'eth1' not found
0

Expected Results:
interface 'eth1' not found
1

12 years agoFix Content-Type in po files to avoid msgfmt warning.
Jiri Popelka [Wed, 7 Dec 2011 16:58:34 +0000 (17:58 +0100)]
Fix Content-Type in po files to avoid msgfmt warning.

de.po: warning: Charset "iso8859-1" is not a portable encoding name.
                Message conversion to user's charset might not work.

12 years agoUpdated README to reflect move to SourceForge.net
Jiri Popelka [Wed, 7 Dec 2011 12:06:10 +0000 (13:06 +0100)]
Updated README to reflect move to SourceForge.net

12 years agoUpdated COPYING file.
Jiri Popelka [Wed, 7 Dec 2011 11:41:31 +0000 (12:41 +0100)]
Updated COPYING file.

http://www.gnu.org/licenses/gpl-2.0.html

12 years agomii-tool: fix inverted advertising/link features
Ben Hutchings [Wed, 4 Jan 2012 21:26:48 +0000 (16:26 -0500)]
mii-tool: fix inverted advertising/link features

On a system with a gigabit NIC attached to a 100mbit switch:
# mii-tool -v eth0
capabilities: 1000baseT-HD 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
advertising:  100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control
link partner: 1000baseT-HD 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control

Clearly the last two fields are swapped, and reading the code supports
this hypothesis.

URL: https://bugs.gentoo.org/393107
URL: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=511395
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agoslattach: man page documents /dev/ptmx support
Bernd Eckenfels [Sat, 31 Dec 2011 20:35:20 +0000 (20:35 +0000)]
slattach: man page documents /dev/ptmx support

12 years agoslattach: add support for /dev/ptmx [Bug:3467521]
Bernd Eckenfels [Sat, 31 Dec 2011 19:25:07 +0000 (19:25 +0000)]
slattach: add support for /dev/ptmx [Bug:3467521]

12 years agoMerge branch 'master' of ssh://net-tools.git.sourceforge.net/gitroot/net-tools/net...
Bernd Eckenfels [Sat, 31 Dec 2011 19:17:46 +0000 (19:17 +0000)]
Merge branch 'master' of ssh://net-tools.git.sourceforge.net/gitroot/net-tools/net-tools

12 years agoBluetooth name fix
Bernd Eckenfels [Thu, 15 Dec 2011 01:30:46 +0000 (01:30 +0000)]
Bluetooth name fix

12 years agoAdd Bluetooth socket support
Lubomir Rintel [Mon, 5 Dec 2011 13:48:28 +0000 (14:48 +0100)]
Add Bluetooth socket support

Signed-off-by: Bernd Eckenfels <bernd@eckenfels.net>
12 years agoifconfig/route: move to /bin
Mike Frysinger [Fri, 2 Dec 2011 21:19:08 +0000 (16:19 -0500)]
ifconfig/route: move to /bin

These tools provide quite a bit of good information which is available
to non-root users, so let's move them to /bin for people to use.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agoignore return value of fgets calls we dont care about
Mike Frysinger [Sat, 10 Dec 2011 22:04:26 +0000 (17:04 -0500)]
ignore return value of fgets calls we dont care about

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agohostname: check return value of getdomainname
Mike Frysinger [Sat, 10 Dec 2011 21:44:23 +0000 (16:44 -0500)]
hostname: check return value of getdomainname

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agonetstat: unify duplicate addr pretty printing
Mike Frysinger [Mon, 21 Nov 2011 01:31:57 +0000 (20:31 -0500)]
netstat: unify duplicate addr pretty printing

The tcp/udp/raw protocols duplicate the logic for looking up addresses and
their ports, and then formatting them nicely.  They also duplicate this for
local and remote addresses.  They also encode a few assumptions about the
length of the strings they get back which can cause buffer over and under
flows.

Add a new helper called addr_do_one that unifies all of this duplicate
logic in one place, and handles any string size correctly.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agofix integer/pointer cast warnings
Mike Frysinger [Mon, 21 Nov 2011 00:51:23 +0000 (19:51 -0500)]
fix integer/pointer cast warnings

On 64bit systems where sizeof(void *) != sizeof(int), we get a warning
when trying to assign the return of atoi().  So insert a cast to avoid.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agofix "format not a string literal" warnings
Mike Frysinger [Mon, 21 Nov 2011 00:49:58 +0000 (19:49 -0500)]
fix "format not a string literal" warnings

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agofix up signed/unsigned warnings
Mike Frysinger [Mon, 21 Nov 2011 00:44:47 +0000 (19:44 -0500)]
fix up signed/unsigned warnings

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agofix up unused variable warnings
Mike Frysinger [Mon, 21 Nov 2011 00:27:14 +0000 (19:27 -0500)]
fix up unused variable warnings

Some of these are unused, so drop them.  Others are only used in debug
code, so refactor those so things are always compiled.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agopull in stdlib.h for malloc() prototype
Mike Frysinger [Mon, 21 Nov 2011 00:25:56 +0000 (19:25 -0500)]
pull in stdlib.h for malloc() prototype

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agoclean up const/unsigned pointers with aftype/hwtype structs
Mike Frysinger [Mon, 21 Nov 2011 00:20:46 +0000 (19:20 -0500)]
clean up const/unsigned pointers with aftype/hwtype structs

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agoget_sname: avoid buffer overflows if proto name is too long
Mike Frysinger [Mon, 21 Nov 2011 00:08:37 +0000 (19:08 -0500)]
get_sname: avoid buffer overflows if proto name is too long

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agoget_sname: unify numeric handling
Mike Frysinger [Mon, 21 Nov 2011 00:08:15 +0000 (19:08 -0500)]
get_sname: unify numeric handling

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agoget_sname: constify args/return when possible
Mike Frysinger [Mon, 21 Nov 2011 00:07:40 +0000 (19:07 -0500)]
get_sname: constify args/return when possible

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agofix path to net-features.h
Mike Frysinger [Sat, 20 Aug 2011 04:56:17 +0000 (04:56 +0000)]
fix path to net-features.h

This was causing the %.o rule to get ignored which meant most of the
dependencies were ignored.

Once that gets fixed, we see that the %.o rule doesn't properly use
$(CPPFLAGS).  So add that while we're here.

Gentoo bug 379715

13 years agopatch from Bert Wesarg to separate basename of -p only if it is absulote
Bernd Eckenfels [Wed, 20 Apr 2011 01:35:22 +0000 (01:35 +0000)]
patch from Bert Wesarg to separate basename of -p only if it is absulote
path (in order to make argv[0]="sshd pty/0" display as sshd, and not as /0.

13 years agonetstat: split host resolution out from --numeric-ports
Mike Frysinger [Sat, 9 Apr 2011 13:57:28 +0000 (13:57 +0000)]
netstat: split host resolution out from --numeric-ports

According to the manual the option "--numeric-ports" should not
affect host resolution, but it does. All connected hosts are displayed
with numeric values instead of their FQDN.

patch by Mads Martin Joergensen in Gentoo bug 76756

13 years agonetstat: fix handling of large socket numbers
Mike Frysinger [Sat, 9 Apr 2011 13:52:05 +0000 (13:52 +0000)]
netstat: fix handling of large socket numbers

The kernel really only treats sockets with a value of -1 as an error.
The rest are an unsigned quantity.  So tweak the nestat lookup to use
an unsigned value.

patch based on Antonio Galea's work in Debian bug 345331

13 years agohostname: fix FQDN handling with AAAA records
Mike Frysinger [Sat, 9 Apr 2011 13:33:13 +0000 (13:33 +0000)]
hostname: fix FQDN handling with AAAA records

patch by pasi.valminen@hut.fi

Gentoo bug 42650

13 years agocorrected indention
Bernd Eckenfels [Thu, 27 Jan 2011 00:43:13 +0000 (00:43 +0000)]
corrected indention

13 years agoadded some address family alias (still needs description) Bug#017886
Bernd Eckenfels [Thu, 27 Jan 2011 00:40:30 +0000 (00:40 +0000)]
added some address family alias (still needs description) Bug#017886
Reported by Toralf

13 years agoBug #17812 Fix the handling of some of the HAVE_* flags ifdef vs if. --jpa468
Bernd Eckenfels [Sat, 1 Jan 2011 03:22:31 +0000 (03:22 +0000)]
Bug #17812 Fix the handling of some of the HAVE_* flags ifdef vs if. --jpa468

13 years ago[Bug #17645] Add netstat(8) support for RcvbufErrors, SndbufErrors.
Bernd Eckenfels [Fri, 29 Oct 2010 19:24:36 +0000 (19:24 +0000)]
[Bug #17645] Add netstat(8) support for RcvbufErrors, SndbufErrors.
Thanks jwm

13 years agonetstat: include sys/stat.h for S_ISREG macros
Mike Frysinger [Sun, 15 Aug 2010 16:09:31 +0000 (16:09 +0000)]
netstat: include sys/stat.h for S_ISREG macros

newer versions of glibc (like 2.12) have cleaned up headers so you need
to include sys/stat.h explicitly for S_XXX macros

Gentoo bug 332853

13 years agoRemove garbage ipv6 scopes in netstat output (Debian Bug #508110)
Bernd Eckenfels [Mon, 5 Jul 2010 22:52:00 +0000 (22:52 +0000)]
Remove garbage ipv6 scopes in netstat output (Debian Bug #508110)
Thanks Marco Steinacher for reporting.

14 years agonetstat: PIDs can be long, Bug #199702 of Ubuntu Launchpad, Bug #16913 of Berlios
Bernd Eckenfels [Fri, 5 Mar 2010 15:35:02 +0000 (15:35 +0000)]
netstat: PIDs can be long, Bug #199702 of Ubuntu Launchpad, Bug #16913 of Berlios

14 years agointerface: fix IPv6 parsing of interfaces with large indexes (> 255)
Mike Frysinger [Fri, 1 Jan 2010 06:35:30 +0000 (06:35 +0000)]
interface: fix IPv6 parsing of interfaces with large indexes (> 255)

patch from Dave Johnson <djohnson@sw.starentnetworks.com> via Debian #433543

When running 'ifconfig' it will not show any IPv6 addresses for
interfaces that have an ifindex > 255.

Because the kernel will increment the ifindex every time an interface
is added or removed, it is not necessary to have 256 interfaces at
once, just creating 256 interfaces since system boot and they will no
longer show IPv6 addresses.

This is due to an improper fscanf() maximum range argument.  Patch to
fix the problem is below.

Example:

st34:~# ip addr list dev eth1.110
268: eth1.110@eth1: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc noqueue
    link/ether 00:e0:81:2a:0d:2d brd ff:ff:ff:ff:ff:ff
    inet6 fd4d:5643:2886:6e::ea:0/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::2e0:81ff:fe2a:d2d/64 scope link
       valid_lft forever preferred_lft forever
st34:~# ifconfig eth1.110
eth1.110  Link encap:Ethernet  HWaddr 00:E0:81:2A:0D:2D
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:676 (676.0 b)

st34:~# grep eth1.110 /proc/net/if_inet6
fd4d56432886006e0000000000ea0000 10c 40 00 80 eth1.110
fe8000000000000002e081fffe2a0d2d 10c 40 20 80 eth1.110
st34:~#

14 years agopo/man: if LINGUAS is set, only install translations for those langs
Mike Frysinger [Fri, 1 Jan 2010 05:59:20 +0000 (05:59 +0000)]
po/man: if LINGUAS is set, only install translations for those langs

14 years agoimprove dist target: include compiled gettext files, exclude scm files, and always...
Mike Frysinger [Thu, 31 Dec 2009 20:38:02 +0000 (20:38 +0000)]
improve dist target: include compiled gettext files, exclude scm files, and always prefix the paths in the tarball with the full versioned name

14 years agoignore generated gettext files
Mike Frysinger [Thu, 31 Dec 2009 20:32:20 +0000 (20:32 +0000)]
ignore generated gettext files

14 years agoset BASEDIR to DESTDIR by default so the default install matches most packages
Mike Frysinger [Thu, 31 Dec 2009 20:14:55 +0000 (20:14 +0000)]
set BASEDIR to DESTDIR by default so the default install matches most packages

14 years agofix parallel build problems with the lib/ subdir and multiple targets that descend...
Mike Frysinger [Thu, 31 Dec 2009 20:06:53 +0000 (20:06 +0000)]
fix parallel build problems with the lib/ subdir and multiple targets that descend into it

14 years agonetstat: fix %*s handling -- the field takes an int, not a size_t
Mike Frysinger [Thu, 31 Dec 2009 19:54:16 +0000 (19:54 +0000)]
netstat: fix %*s handling -- the field takes an int, not a size_t

14 years agointerface slip: cast keepalive/outfill to unsigned long to fix warnings on 64bit...
Mike Frysinger [Thu, 31 Dec 2009 19:51:31 +0000 (19:51 +0000)]
interface slip: cast keepalive/outfill to unsigned long to fix warnings on 64bit hosts -- no functional changes since these only have an 8bit range anyways

14 years agoignore patch related files
Mike Frysinger [Thu, 31 Dec 2009 19:05:34 +0000 (19:05 +0000)]
ignore patch related files