summaryrefslogtreecommitdiffstats
path: root/userspace
diff options
context:
space:
mode:
authorBart De Schuymer <bdschuym@pandora.be>2003-04-01 06:31:46 +0000
committerBart De Schuymer <bdschuym@pandora.be>2003-04-01 06:31:46 +0000
commitfa95f496edd2a7bb72a2b1491de447454df04487 (patch)
tree57ea0b3c82e49a54c9a041d488c33ff899ef9b41 /userspace
parent5f4d378dc7d22e371b12f248d5325836e401e4fa (diff)
fix compare bug
Diffstat (limited to 'userspace')
-rw-r--r--userspace/ebtables2/extensions/ebt_ip.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/userspace/ebtables2/extensions/ebt_ip.c b/userspace/ebtables2/extensions/ebt_ip.c
index 76da2b7..1e1504c 100644
--- a/userspace/ebtables2/extensions/ebt_ip.c
+++ b/userspace/ebtables2/extensions/ebt_ip.c
@@ -443,11 +443,13 @@ static int compare(const struct ebt_entry_match *m1,
return 0;
}
if (ipinfo1->bitmask & EBT_IP_SPORT) {
- if (ipinfo1->sport != ipinfo2->sport)
+ if (ipinfo1->sport[0] != ipinfo2->sport[0] ||
+ ipinfo1->sport[1] != ipinfo2->sport[1])
return 0;
}
if (ipinfo1->bitmask & EBT_IP_DPORT) {
- if (ipinfo1->dport != ipinfo2->dport)
+ if (ipinfo1->dport[0] != ipinfo2->dport[0] ||
+ ipinfo1->dport[1] != ipinfo2->dport[1])
return 0;
}
return 1;