misc/150040: fwtk plug-gw does not run on 64bit architectures

Rudolf Polzer rpolzer at mucke-novak.net
Fri Aug 27 13:50:07 UTC 2010

>Number:         150040
>Category:       misc
>Synopsis:       fwtk plug-gw does not run on 64bit architectures
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug 27 13:50:06 UTC 2010
>Originator:     Rudolf Polzer
>Release:        7.2
FreeBSD dns7.tnd.lab.arcor.de 7.2-RELEASE-p4 FreeBSD 7.2-RELEASE-p4 #0: Wed Oct 14 11:48:08 UTC 2009     root at build64-7.tnd.arcor.net:/usr/obj/usr/src/sys/DL380DNS  amd64

fwtk plug-gw segfaults on startup. Caused by missing declaration of inet_ntoa causing its pointer return value to default to int, which has different size, and thus causing a segfault.
cd /usr/ports/security/fwtk
make install
then set up fwtk normally, using a plug-gw filter
then connect to the port
Patch attached that adds an #include directive to get inet_ntoa declared.

Patch attached with submission follows:

Patch from Rudolf Polzer to fix a compile time warning
and make binaries compiled on 64bit FreeBSD 7.3 work
without segfault on startup.

diff -ru lib/pname.c lib/pname.c
--- lib/pname.c	1997-01-18 19:20:57.000000000 +0000
+++ lib/pname.c	2010-06-30 12:06:26.000000000 +0000
@@ -15,6 +15,7 @@
 #include	<sys/types.h>
 #include	<sys/socket.h>
 #include	<netinet/in.h>
+#include	<arpa/inet.h>
 #include	<netdb.h>
 #include	<syslog.h>
 #include	<ctype.h>


More information about the freebsd-bugs mailing list