if ((info->bitmask & bit) == 0)
return;
- xt_xlate_add(xl, "ip icmp type ");
+ xt_xlate_add(xl, "icmp type ");
if (info->invflags & bit)
xt_xlate_add(xl, "!= ");
if (info->icmp_type[0] == info->icmp_type[1])
info->icmp_code[1] == 0xff)
return;
- xt_xlate_add(xl, "ip icmp code ");
+ xt_xlate_add(xl, "icmp code ");
if (info->invflags & bit)
xt_xlate_add(xl, "!= ");
if (info->icmp_code[0] == info->icmp_code[1])
xt_xlate_add(xl, "ip dscp ");
if (info->invflags & EBT_IP_TOS)
xt_xlate_add(xl, "!= ");
- xt_xlate_add(xl, "0x%02X ", info->tos & ~0x3); /* remove ECN bits */
+ xt_xlate_add(xl, "0x%02x ", info->tos & 0x3f); /* remove ECN bits */
}
if (info->bitmask & EBT_IP_PROTO) {
struct protoent *pe;
nft insert rule bridge filter FORWARD ip daddr 10.0.0.1 counter
ebtables-translate -I OUTPUT 3 -o eth0 --ip-tos 0xff
-nft insert rule bridge filter OUTPUT oifname "eth0" ip dscp 0xFC counter
+nft insert rule bridge filter OUTPUT oifname "eth0" ip dscp 0x3f counter
ebtables-translate -A FORWARD --ip-proto tcp --ip-dport 22
nft add rule bridge filter FORWARD tcp dport 22 counter
nft add rule bridge filter FORWARD ip protocol 253 counter
ebtables-translate -A FORWARD --ip-icmp-type "echo-request"
-nft add rule bridge filter FORWARD ip icmp type 8 counter
+nft add rule bridge filter FORWARD icmp type 8 counter
ebtables-translate -A FORWARD --ip-icmp-type 1/1
-nft add rule bridge filter FORWARD ip icmp type 1 ip icmp code 1 counter
+nft add rule bridge filter FORWARD icmp type 1 icmp code 1 counter
ebtables-translate -A FORWARD --ip-icmp-type ! 1:10
-nft add rule bridge filter FORWARD ip icmp type != 1-10 counter
+nft add rule bridge filter FORWARD icmp type != 1-10 counter