From fa95f496edd2a7bb72a2b1491de447454df04487 Mon Sep 17 00:00:00 2001 From: Bart De Schuymer Date: Tue, 1 Apr 2003 06:31:46 +0000 Subject: fix compare bug --- userspace/ebtables2/extensions/ebt_ip.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'userspace') 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; -- cgit v1.2.3