mirror of
https://github.com/openvswitch/ovs
synced 2025-10-25 15:07:05 +00:00
packets: Adds ethernet-matching helper functions
With OpenFlow 1.1 requiring arbitrary ethernet match support, it simplifies other code if we have some extra helper functions. This patch adds eth_mask_is_exact(mask), eth_addr_bitand(src, mask, dst), eth_addr_equal_except(a, b, mask) and eth_format_masked(eth, mask, output). Signed-off-by: Joe Stringer <joe@wand.net.nz> Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
@@ -2273,10 +2273,7 @@ mf_format(const struct mf_field *mf,
|
||||
break;
|
||||
|
||||
case MFS_ETHERNET:
|
||||
ds_put_format(s, ETH_ADDR_FMT, ETH_ADDR_ARGS(value->mac));
|
||||
if (mask) {
|
||||
ds_put_format(s, "/"ETH_ADDR_FMT, ETH_ADDR_ARGS(mask->mac));
|
||||
}
|
||||
eth_format_masked(value->mac, mask->mac, s);
|
||||
break;
|
||||
|
||||
case MFS_IPV4:
|
||||
|
||||
Reference in New Issue
Block a user