From af6bce18eeb7736426e593d6fb042a4d56805172 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 9 May 2011 16:03:26 -0700 Subject: [PATCH] ofp-util: Also force nw_tos to be wildcarded for ARP flows. OVS doesn't fill nw_tos with anything meaningful for ARP flows so we should also force nw_tos to be wildcarded for ARP. --- lib/ofp-util.c | 2 +- tests/ofp-print.at | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ofp-util.c b/lib/ofp-util.c index e723fd2e..9507d94a 100644 --- a/lib/ofp-util.c +++ b/lib/ofp-util.c @@ -2097,7 +2097,7 @@ normalize_wildcards(const struct ofp_match *m) wc |= htonl(OFPFW_TP); } } else if (m->dl_type == htons(ETH_TYPE_ARP)) { - wc |= htonl(OFPFW_TP); + wc |= htonl(OFPFW_TP | OFPFW_NW_TOS); } else { wc |= htonl(OFPFW_NW | OFPFW_TP); } diff --git a/tests/ofp-print.at b/tests/ofp-print.at index 417ef48a..604267a0 100644 --- a/tests/ofp-print.at +++ b/tests/ofp-print.at @@ -287,11 +287,11 @@ AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\ 00 00 00 00 00 00 00 00 00 00 00 05 00 00 00 00 \ 00 00 01 0e 00 00 00 00 00 00 00 08 00 03 00 00 \ " 2], [0], [dnl -OFPT_FLOW_MOD (xid=0x0): ADD priority=65535,arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,opcode=2,nw_tos=0 idle:5 buf:0x10e actions=output:3 +OFPT_FLOW_MOD (xid=0x0): ADD priority=65535,arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,opcode=2 idle:5 buf:0x10e actions=output:3 ], [dnl ofp_util|INFO|normalization changed ofp_match, details: ofp_util|INFO| pre: arp,in_port=1,dl_vlan=65535,dl_vlan_pcp=0,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,opcode=2,nw_tos=0,tp_src=0,tp_dst=0 -ofp_util|INFO|post: arp,in_port=1,dl_vlan=65535,dl_vlan_pcp=0,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,opcode=2,nw_tos=0 +ofp_util|INFO|post: arp,in_port=1,dl_vlan=65535,dl_vlan_pcp=0,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,opcode=2 ]) AT_CLEANUP @@ -309,7 +309,7 @@ OFPT_FLOW_MOD (xid=0x0): ADD arp,in_port=1,dl_vlan=65535,dl_vlan_pcp=0,dl_src=50 ], [dnl ofp_util|INFO|normalization changed ofp_match, details: ofp_util|INFO| pre: arp,in_port=1,dl_vlan=65535,dl_vlan_pcp=0,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,opcode=2,nw_tos=0,tp_src=0,tp_dst=0 -ofp_util|INFO|post: arp,in_port=1,dl_vlan=65535,dl_vlan_pcp=0,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,opcode=2,nw_tos=0 +ofp_util|INFO|post: arp,in_port=1,dl_vlan=65535,dl_vlan_pcp=0,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,opcode=2 ]) AT_CLEANUP -- 2.30.2