nacl_build.sh: use portable way of entering previous directory

While writing a puppet manifest to provision netsniff-ng on a server.
I encountered the following shell warnings:

Notice: /Stage[main]/Netsniff_ng::Install/Exec[Install Netsniff-NG]/returns: Building NaCl for arch amd64 on host localhost (grab a coffee, this takes a while) ...
Notice: /Stage[main]/Netsniff_ng::Install/Exec[Install Netsniff-NG]/returns: ./nacl_build.sh: line 41: cd: /root/netsniff-ng/curvetun: No such file or directory
Notice: /Stage[main]/Netsniff_ng::Install/Exec[Install Netsniff-NG]/returns: NaCl lib path /root/nacl/nacl-20110221/build/localhost/lib/amd64
Notice: /Stage[main]/Netsniff_ng::Install/Exec[Install Netsniff-NG]/returns: NaCl include path /root/nacl/nacl-20110221/build/localhost/include/amd64
Notice: /Stage[main]/Netsniff_ng::Install/Exec[Install Netsniff-NG]/returns: ./nacl_build.sh: line 49: ./nacl_path.sh: No such file or directory

They went away after I applied this patch.

Signed-off-by: Jon Schipp <jonschipp@gmail.com>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
astraceroute/Makefile: don't build ring_rx.o

Building astraceroute fails on EL systems because
TPACKET_V3 is not available. Astraceroute functions
properly without ring_rx.o.

$ cat /etc/redhat-release
CentOS release 6.4 (Final)

Pre-patch:

Building astraceroute:
  CC	xmalloc.c
  CC	ioops.c
  CC	proto_none.c
  CC	tprintf.c
  CC	bpf.c
  CC	str.c
  CC	sig.c
  CC	sock.c
  CC	link.c
  CC	ring_rx.c
In file included from ring_rx.c:21:
ring_rx.h:25: warning: ‘struct block_desc’ declared inside parameter list
ring_rx.h: In function ‘user_may_pull_from_rx_block’:
ring_rx.h:27: error: dereferencing pointer to incomplete type
ring_rx.h: At top level:
ring_rx.h:35: warning: ‘struct block_desc’ declared inside parameter list
ring_rx.h: In function ‘kernel_may_pull_from_rx_block’:
ring_rx.h:37: error: dereferencing pointer to incomplete type
ring_rx.c: In function ‘destroy_rx_ring’:
ring_rx.c:26: error: ‘TPACKET_V3’ undeclared (first use in this function)
ring_rx.c:26: error: (Each undeclared identifier is reported only once
ring_rx.c:26: error: for each function it appears in.)
ring_rx.c: In function ‘setup_rx_ring_layout’:
ring_rx.c:63: error: dereferencing pointer to incomplete type
ring_rx.c:63: error: dereferencing pointer to incomplete type
ring_rx.c:68: error: ‘struct ring’ has no member named ‘layout3’
ring_rx.c:69: error: ‘struct ring’ has no member named ‘layout3’
ring_rx.c:70: error: ‘struct ring’ has no member named ‘layout3’
ring_rx.c: In function ‘create_rx_ring’:
ring_rx.c:83: error: ‘TPACKET_V3’ undeclared (first use in this function)
ring_rx.c:87: error: ‘struct ring’ has no member named ‘layout3’
ring_rx.c: In function ‘alloc_rx_ring_frames’:
ring_rx.c:118: error: ‘TPACKET_V3’ undeclared (first use in this function)
ring_rx.c:121: error: ‘struct ring’ has no member named ‘layout3’
ring_rx.c:122: error: ‘struct ring’ has no member named ‘layout3’
ring_rx.c: In function ‘sock_rx_net_stats’:
ring_rx.c:147: error: ‘TPACKET_V3’ undeclared (first use in this function)
ring_rx.c:150: error: field ‘k3’ has incomplete type
make: *** [astraceroute/ring_rx.o] Error 1

Post-patch:
Building astraceroute:
  CC	xmalloc.c
  CC	ioops.c
  CC	proto_none.c
  CC	tprintf.c
  CC	bpf.c
  CC	str.c
  CC	sig.c
  CC	sock.c
  CC	link.c
  CC	ring.c
  CC	dev.c
  CC	astraceroute.c
  CC	geoip.c
  LD	astraceroute
  STRIP	astraceroute

Signed-off-by: Jon Schipp <jonschipp@gmail.com>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
mausezahn: re-work configuration file

/etc/netsniff-ng/mausezahn.conf as mentioned in manual was never read
because code was statically set to mz.cfg in /etc/mausezahn. This patch
simplifies things by using the existing /etc/netsniff-ng directory created
in the default install and still using a single configuration but with a
an easier to remember name e.g. ${tool}.conf.

Example:

$ cat /etc/netsniff-ng/mausezahn.conf
user = testuser
password = testpassword
enable = awesome

Pre-patch:

$ mausezahn -x
Mausezahn accepts incoming Telnet connections on port 25542.
mz: Problems opening config file. Will use defaults

Post-patch:

$ mausezahn -x
Mausezahn accepts incoming Telnet connections on port 25542.

Signed-off-by: Jon Schipp <jonschipp@gmail.com>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
build: astraceroute: Only build ioops with GeoIP support enabled

The ioops module is only needed in geoip.o, thus make it dependent on
CONFIG_GEOIP.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
build: flowtop: Only build ioops with GeoIP support enabled

Follow commit 9ad7f8882097 ("build: astraceroute: Only build ioops with
GeoIP support enabled").

The ioops module is only needed in geoip.o, thus make it dependent on
CONFIG_GEOIP.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Merge remote-tracking branch 'upstream/master'