projects
/
oweals
/
firewall3.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aeba574
)
Fix endian issue in compare_addr(), solves auto detection of "option dest" for redire...
author
Jo-Philipp Wich
<jow@openwrt.org>
Thu, 6 Jun 2013 10:35:50 +0000
(12:35 +0200)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Thu, 6 Jun 2013 10:35:50 +0000
(12:35 +0200)
redirects.c
patch
|
blob
|
history
diff --git
a/redirects.c
b/redirects.c
index e5945f048ef94b74e0b543b34bae3ea8832ff77d..15855c9ea74673af8614a7ad7c3ccdc88f1eda08 100644
(file)
--- a/
redirects.c
+++ b/
redirects.c
@@
-121,7
+121,7
@@
compare_addr(struct fw3_address *a, struct fw3_address *b)
if (a->family != FW3_FAMILY_V4)
return false;
- mask =
~((1 << (32 - a->mask)) - 1
);
+ mask =
htonl(~((1 << (32 - a->mask)) - 1)
);
return ((a->address.v4.s_addr & mask) == (b->address.v4.s_addr & mask));
}