summaryrefslogtreecommitdiffstats
path: root/libiptc
diff options
context:
space:
mode:
authorlaforge <laforge>2003-06-24 18:28:36 +0000
committerlaforge <laforge>2003-06-24 18:28:36 +0000
commitedc41ac1258ec0d2f37e8a6d441ce894d62cb84d (patch)
treeba93d86bb6e1c226f8f36f681d1e616999b373cc /libiptc
parentc2f000b273a18b132edff49510b585d24060a68a (diff)
fix ipv6_prefix_length endianness bugs (Closes: #103)
Diffstat (limited to 'libiptc')
-rw-r--r--libiptc/libip6tc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libiptc/libip6tc.c b/libiptc/libip6tc.c
index 84e139c..9a78a5a 100644
--- a/libiptc/libip6tc.c
+++ b/libiptc/libip6tc.c
@@ -111,7 +111,7 @@ typedef unsigned int socklen_t;
#include "libiptc.c"
#define BIT6(a, l) \
- (((a->in6_u.u6_addr32[(l) / 32]) >> ((l) & 31)) & 1)
+ ((ntohl(a->in6_u.u6_addr32[(l) / 32]) >> (31 - ((l) & 31))) & 1)
int
ipv6_prefix_length(const struct in6_addr *a)