aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* netstat: unify duplicate addr pretty printingHEADmasterMike Frysinger2011-11-201-64/+38
| | | | | | | | | | | | | 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>
* fix integer/pointer cast warningsMike Frysinger2011-11-201-2/+2
| | | | | | | 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>
* fix "format not a string literal" warningsMike Frysinger2011-11-203-3/+3
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* fix up signed/unsigned warningsMike Frysinger2011-11-2012-12/+12
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* fix up unused variable warningsMike Frysinger2011-11-2012-155/+127
| | | | | | | 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>
* pull in stdlib.h for malloc() prototypeMike Frysinger2011-11-201-0/+1
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* clean up const/unsigned pointers with aftype/hwtype structsMike Frysinger2011-11-2025-48/+48
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* get_sname: avoid buffer overflows if proto name is too longMike Frysinger2011-11-201-10/+11
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* get_sname: unify numeric handlingMike Frysinger2011-11-201-5/+7
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* get_sname: constify args/return when possibleMike Frysinger2011-11-202-2/+2
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* fix path to net-features.hMike Frysinger2011-08-201-2/+2
| | | | | | | | | | 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
* patch from Bert Wesarg to separate basename of -p only if it is absuloteBernd Eckenfels2011-04-201-2/+2
| | | | path (in order to make argv[0]="sshd pty/0" display as sshd, and not as /0.
* netstat: split host resolution out from --numeric-portsMike Frysinger2011-04-091-11/+11
| | | | | | | | 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
* netstat: fix handling of large socket numbersMike Frysinger2011-04-091-5/+5
| | | | | | | | 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
* hostname: fix FQDN handling with AAAA recordsMike Frysinger2011-04-091-8/+59
| | | | | | patch by pasi.valminen@hut.fi Gentoo bug 42650
* corrected indentionBernd Eckenfels2011-01-271-2/+2
|
* added some address family alias (still needs description) Bug#017886Bernd Eckenfels2011-01-271-3/+8
| | | | Reported by Toralf
* Bug #17812 Fix the handling of some of the HAVE_* flags ifdef vs if. --jpa468Bernd Eckenfels2011-01-013-8/+10
|
* [Bug #17645] Add netstat(8) support for RcvbufErrors, SndbufErrors.Bernd Eckenfels2010-10-291-2/+4
| | | | Thanks jwm
* netstat: include sys/stat.h for S_ISREG macrosMike Frysinger2010-08-151-1/+2
| | | | | | | 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
* Remove garbage ipv6 scopes in netstat output (Debian Bug #508110)Bernd Eckenfels2010-07-051-4/+6
| | | | Thanks Marco Steinacher for reporting.
* netstat: PIDs can be long, Bug #199702 of Ubuntu Launchpad, Bug #16913 of ↵Bernd Eckenfels2010-03-051-3/+3
| | | | Berlios
* interface: fix IPv6 parsing of interfaces with large indexes (> 255)Mike Frysinger2010-01-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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:~#
* po/man: if LINGUAS is set, only install translations for those langsMike Frysinger2010-01-012-13/+24
|
* improve dist target: include compiled gettext files, exclude scm files, and ↵Mike Frysinger2009-12-312-2/+9
| | | | always prefix the paths in the tarball with the full versioned name
* ignore generated gettext filesMike Frysinger2009-12-311-0/+2
|
* set BASEDIR to DESTDIR by default so the default install matches most packagesMike Frysinger2009-12-311-0/+1
|
* fix parallel build problems with the lib/ subdir and multiple targets that ↵Mike Frysinger2009-12-311-2/+3
| | | | descend into it
* netstat: fix %*s handling -- the field takes an int, not a size_tMike Frysinger2009-12-311-2/+2
|
* interface slip: cast keepalive/outfill to unsigned long to fix warnings on ↵Mike Frysinger2009-12-311-3/+3
| | | | 64bit hosts -- no functional changes since these only have an 8bit range anyways
* ignore patch related filesMike Frysinger2009-12-311-0/+5
|
* netstat: add sctp connection decoding (Debian #306428 and Gentoo #258714)Mike Frysinger2009-09-062-7/+180
|
* ifconfig: fix no output when if_readlist_proc() failsMike Frysinger2009-09-061-5/+8
| | | | | | The rewrite of if_readlist() on 28 Jun 2003 broke the function when the proc interface isn't readable. Have if_readlist() return an error only if both if_readxxx funcs failed. This fixes Gentoo 238363.
* slattach: use fchown() rather than chown() to avoid race between creation ↵Mike Frysinger2009-09-061-4/+6
| | | | and permission changing
* enable -fno-strict-aliasing until the code base gets a hefty clean up to fix ↵Mike Frysinger2009-09-061-0/+1
| | | | all of the strict aliasing problems
* convert -idirafter to -IMike Frysinger2009-09-062-2/+2
| | | | | | | The local include trees no longer need -idirafter semantics, so use the normal -I flags to avoid random cruft on users' systems. This fixes Gentoo #283759 where user had local headers named the same as the net-tools local headers, but the toolchain defaulted to the system paths due to -idirafter.
* add missing dependency on version.h to libdir target to fix parallel build ↵Mike Frysinger2009-09-061-1/+1
| | | | failures
* touch up build system to respect normal toolchain env vars rather than ↵Mike Frysinger2009-09-061-10/+7
| | | | requiring people to set random custom ones
* handle raw "IP" masqinfoMike Frysinger2009-09-061-2/+4
|
* move man/fr_FR/*.8 pages into the "administrator" sectionMike Frysinger2009-09-065-5/+5
|
* arp: document the existing -e/-t optionsMike Frysinger2009-09-062-3/+7
|
* netstat: fix typo in udp displayMike Frysinger2009-09-061-2/+2
| | | | | | The recent patch to add udplite support introduced a typo in the udp name. This fixes Gentoo #282794 and Debian #545328. Originally reported by Ambroz Bizjak <ambro@b4ever.net>.
* start a .gitignoreMike Frysinger2009-09-061-0/+22
|
* Missing include to make compileable with gcc-4.3.2 and glibc-2.9_p20081201Bernd Eckenfels2009-09-061-1/+2
| | | | Patch from Petr Pisar [Berlios Bug#16232].
* ignore local .git dirMike Frysinger2009-09-061-0/+1
|
* Fix for Feature Request from ssbBernd Eckenfels2009-08-271-5/+11
| | | | [ Feature Request #4466 ] --continuous should flush stdout
* Czech translation update by petr.pisar@atlas.czBernd Eckenfels2009-08-271-1147/+1987
|
* Avoid name resolution for listening or established sockets (-l) by returnBernd Eckenfels2009-07-281-3/+5
| | | | fast. Problem reported by Ragnar Hojland Espinosa <ragnar@ragnar-hojland.com>
* scanf format length fix (non exploitable?) fromBernd Eckenfels2009-07-084-23/+23
| | | | Fabian Hugelshofer <hugelshofer2006@gmx.ch>
* -W optionBernd Eckenfels2008-12-021-0/+1
|