diff options
author | Numan Siddique <nusiddiq@redhat.com> | 2017-09-27 21:36:18 +0530 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2017-10-25 14:26:25 -0700 |
commit | 7ebfcd3d93fd4aabe4dc516c3b3c43a4d3f9df3f (patch) | |
tree | 38f19f01adbe6f93fa4bd6ab93d2891b6334e839 /tests | |
parent | f399456a389ba9012b02798c70900e8197805d1b (diff) | |
download | openvswitch-7ebfcd3d93fd4aabe4dc516c3b3c43a4d3f9df3f.tar.gz |
ovn-northd: Do not add lflows in lr_in_arp_resolve stage for disabled logical ports
ovn-northd is adding the below logical flow for a disabled logical port (with mac M
and IP 'A')
table=6 (lr_in_arp_resolve ), match=(outport == "lrp-port" && reg0 == 'A'),
action=(eth.dst = 'M'; next;)
In the case of openstack load balancer 'octavia' service, it creates logical
ports 'P1' (M1 IP1) and 'P2' (M2 IP2). It then disables logical port P2 and
adds IP2 to P1 - (M1 IP1 IP2).
When another port tries to reach IP2, it doesn't get delivered to port P1 because
of the above flow.
Signed-off-by: Numan Siddique <nusiddiq@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ovn.at | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/ovn.at b/tests/ovn.at index 6c38b973f..490841c63 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -3050,6 +3050,27 @@ echo $packet | ovstest test-ovn expr-to-packets > expected OVN_CHECK_PACKETS([hv2/vif1-tx.pcap], [expected]) +AT_CHECK([ovn-sbctl dump-flows | grep lr_in_arp_resolve | \ +grep "reg0 == 172.16.1.2" | wc -l], [0], [1 +]) + +# Disable the ls2-lp1 port. +ovn-nbctl --wait=hv set logical_switch_port ls2-lp1 enabled=false + +AT_CHECK([ovn-sbctl dump-flows | grep lr_in_arp_resolve | \ +grep "reg0 == 172.16.1.2" | wc -l], [0], [0 +]) + +# Generate the packet destined for ls2-lp1 and it should not be delivered. +# Packet to send. +packet="inport==\"ls1-lp1\" && eth.src==$ls1_lp1_mac && eth.dst==$rp_ls1_mac && + ip4 && ip.ttl==64 && ip4.src==$ls1_lp1_ip && ip4.dst==$ls2_lp1_ip && + udp && udp.src==53 && udp.dst==4369" + +as hv1 ovs-appctl -t ovn-controller inject-pkt "$packet" +# The 2nd packet sent shound not be received. +OVN_CHECK_PACKETS([hv2/vif1-tx.pcap], [expected]) + OVN_CLEANUP([hv1],[hv2]) AT_CLEANUP |