[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#605236: FTBFS: No address is being initialized.



The problem is that the code 'src/fprobe.c:1350-1352' is never
executed, neither for GNU/Linux, nor for GNU/kFreeBSD. Thus the
address

   peers[npeers].laddr

is left as zero when assiving at the call to bind(3). In particular,

   peers[npeers].laddr.sin_family == 0   ( == AF_UNSPEC)

This is an acceptable wild card for bind(3) on GNU/Linux, but not
with GNU/kFreeBSD, as it demands and actually check that either
AF_INET, AF_INET6, AF_LOCAL, and possibly others are explictly given.
The value AF_UNSPEC (=0) is forbidden! Otherwise the call fails,
exactly as you have found out.

The conclusion is that the software is broken also on GNU/Linux,
given that a call

    ./src/fprobe -ieth0 localhost:2055

is correct, which seems plausible.

There is one remedy possible:

--- fprobe-1.1/src/fprobe.c.orig
+++ fprobe-1.1/src/fprobe.c
@@ -1326,6 +1326,7 @@
 		peers[npeers].sock = sock;
 		peers[npeers].type = PEER_MIRROR;
 		peers[npeers].laddr = saddr;
+		peers[npeers].laddr.sin_family = AF_INET;
 		peers[npeers].seq = 0;
 		if ((lhost = strchr(dport, '/'))) {
 			*lhost++ = 0;

Together with your obervation on __FAVOR_BSD, this new insertion
will produce an executable that starts a live deamon on kfreebsd-amd64
from the command line invokation you mentioned.


Best regards,
Mats Erik Andersson, DM incognito


Reply to: