long vs u_int32_t in ipfwadm

B. James Phillippe (bryan@terran.org)
Sat, 11 Jul 1998 18:01:22 -0700 (PDT)


Greetings,

I have found a problem with ipfwadm-2.3.0 when compiled under
glibc-2.0.7. In the linux-2.0 kernel, <linux/ip_fw.h> defines struct
ip_fw, which contains (among other things) byte & packet counters specified
as unsigned longs. In the glibc include <netinet/ip_fw.h>, struct ip_fw is
defined with the counters as u_int32_t. This coincidentally works on x86,
but on Alpha it causes both unaligned traps and changes the size of the
firewall struct, which, when passed in a call to setsockopt() is an
invalid argument (and setsockopt fails).
I'm not sure who's to blame here though. Is it proper that a.)
fw_bcnt and fw_pcnt be changed to u_int64_t in glibc, or b.) ipfwadm-2.3
include <linux/ip_fw.h> over glibc's? It seems to me that glibc should be
changed.

Thoughts?

-bp

--
B. James Phillippe <bryan@terran.org>
Linux Software Engineer, WGT Inc.
http://earth.terran.org/~bryan

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html