break;
}
- if (s->identifier == NULL)
+ if (s->identifier == NULL || nft_output_numeric_symbol(octx))
return expr_basetype(expr)->print(expr, octx);
- if (quotes)
- nft_print(octx, "\"");
-
- if (nft_output_numeric_symbol(octx))
- nft_print(octx, "%" PRIu64 "", val);
- else
- nft_print(octx, "%s", s->identifier);
-
- if (quotes)
- nft_print(octx, "\"");
+ nft_print(octx, quotes ? "\"%s\"" : "%s", s->identifier);
}
static void switch_byteorder(void *data, unsigned int len)
arp operation {nak, inreply, inrequest, rreply, rrequest, reply, request};ok
arp operation != {nak, inreply, inrequest, rreply, rrequest, reply, request};ok
+arp operation 1-2;ok
arp operation request;ok
arp operation reply;ok
arp operation rrequest;ok
[ payload load 2b @ network header + 6 => reg 1 ]
[ lookup reg 1 set __set%d 0x1 ]
+# arp operation 1-2
+arp test-arp input
+ [ payload load 2b @ network header + 6 => reg 1 ]
+ [ cmp gte reg 1 0x00000100 ]
+ [ cmp lte reg 1 0x00000200 ]
+
# arp operation request
arp test-arp input
[ payload load 2b @ network header + 6 => reg 1 ]
[ payload load 2b @ network header + 6 => reg 1 ]
[ lookup reg 1 set __set%d 0x1 ]
+# arp operation 1-2
+netdev test-netdev ingress
+ [ meta load protocol => reg 1 ]
+ [ cmp eq reg 1 0x00000608 ]
+ [ payload load 2b @ network header + 6 => reg 1 ]
+ [ cmp gte reg 1 0x00000100 ]
+ [ cmp lte reg 1 0x00000200 ]
+
# arp operation request
netdev test-netdev ingress
[ meta load protocol => reg 1 ]