when I run netstat-nat on my gentoo gateway and there are nat connection preset it does not list anything. I get this. gentoo etc # netstat-nat Proto NATed Address Foreign Address State gentoo etc # Reproducible: Always Steps to Reproduce: 1.build kernel to support NAT 2.build iptables rules to NAT 3.emerge netstat-nat 4.make a NAT connection through the gateway 5.run netstat-nat Actual Results: it shows no connections. although if I 'cat /proc/net/ip_conntrack' it shows my NAT connections Expected Results: formated the NAT connections into a user friendly view # emerge info Portage 2.0.51-r3 (default-linux/x86/2004.3, gcc-3.3.4, glibc-2.3.4.20040808-r1, 2.6.9-gentoo-r9 i686) ================================================================= System uname: 2.6.9-gentoo-r9 i686 AMD Athlon(tm) XP 2400+ Gentoo Base System version 1.4.16 Autoconf: sys-devel/autoconf-2.59-r5 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.15.90.0.1.1-r3 Headers: sys-kernel/linux26-headers-2.6.8.1-r1 Libtools: sys-devel/libtool-1.5.2-r7 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms" GENTOO_MIRRORS="http://gentoo.chem.wisc.edu/gentoo/ http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="aalib adns apache2 avi bcmath berkdb bitmap-fonts chroot crypt cups encode ethereal f77 fastcgi fbcon foomaticdb fortran freetds gd gdbm gif gpm imlib java jpeg ldap libg++ libwww mad mbox mikmod milter mime mmx motif mpeg mysql mysqli ncurses nls nocardbus nptl odbc oggvorbis opengl pam pcre pdflib perl php png python quicktime readline samba sasl sdl simplexml slang sockets spell spl sqlite sse ssl svga tcltk tcpd tiff truetype x86 xml xml2 xmlrpc xmms xv zlib"
Created attachment 46517 [details, diff] patch for netstat-nat (fixes TCP and UDP Only) This fixes displaying TCP and UDP connections. netstat-nat is pulling the wrong parts of the array from buf[x] I fixed it for TCP and UDP. Need more info out of /proc/net/ip_conntrack for ICMP and Unknow packets to show them correctly.
please attach a unified diff (diff -u)
version bumped to 1.4.4 - hope this fixes the problem. seems as though they have rewritten it as I can see no real match for where your patch applies to. Using unified (diff -u) puts useful info at the top like which file it appies to. Please use it in future. Can you please comment if this newer version works.
emerged the new version this morning it is working great.
Sparc people - planning on removing netstat-nat-1.4.3.ebuild (stable sparc) as it refers to info at the wrong offset in the file. I doubt this is working on sparc either. 1.4.4 may work.
Both 1.4.3 and 1.4.4 work here for me. Let me know when you want to bump it and I'll stablize.
bump
Jason - go for the 1.4.4 stabilisation and I'll catch up with the other arches. Thankyou