summaryrefslogtreecommitdiffstats
path: root/iptables
diff options
context:
space:
mode:
Diffstat (limited to 'iptables')
-rw-r--r--iptables/nft.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/iptables/nft.c b/iptables/nft.c
index c2cbc9d7..dae6698d 100644
--- a/iptables/nft.c
+++ b/iptables/nft.c
@@ -1324,7 +1324,7 @@ static int add_nft_tcpudp(struct nft_handle *h,struct nftnl_rule *r,
return 0;
}
- if (src[0] || src[1] < 0xffff) {
+ if (src[0] || src[1] < UINT16_MAX || invert_src) {
expr = gen_payload(h, NFT_PAYLOAD_TRANSPORT_HEADER, 0, 2, &reg);
if (!expr)
return -ENOMEM;
@@ -1335,7 +1335,7 @@ static int add_nft_tcpudp(struct nft_handle *h,struct nftnl_rule *r,
return ret;
}
- if (dst[0] || dst[1] < 0xffff) {
+ if (dst[0] || dst[1] < UINT16_MAX || invert_dst) {
expr = gen_payload(h, NFT_PAYLOAD_TRANSPORT_HEADER, 2, 2, &reg);
if (!expr)
return -ENOMEM;