summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2016-09-30 08:23:21 -0700
committerBen Pfaff <blp@ovn.org>2016-09-30 08:23:22 -0700
commit9fcb6a1845caeeafd1265209d5914c548858a171 (patch)
treecbba51946654bd5899e00fc00236ed3a43ba445e /tests
parentb46e72e9da279e0befed8afc5e700dfd34b86776 (diff)
downloadopenvswitch-9fcb6a1845caeeafd1265209d5914c548858a171.tar.gz
ovn: Do not reply to ARP or ND NS for a VM's own IP address.
When a VM sends an ARP or an ND NS for its own IP address, it is trying to check for a duplicate address in the network. OVN needs to suppress the reply in such a case, otherwise the VM thinks that its address is a duplicate. Reported-by: Valentine Sinitsyn <valentine.sinitsyn@gmail.com> Reported-at: http://openvswitch.org/pipermail/dev/2016-September/080037.html Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Darrell Ball <dlu998@gmail.com> Tested-by: Valentine Sinitsyn <valentine.sinitsyn@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/ovn.at20
1 files changed, 14 insertions, 6 deletions
diff --git a/tests/ovn.at b/tests/ovn.at
index 677ab462c..20b42a770 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -1107,7 +1107,8 @@ ip_to_hex() {
#
# 8. The switch drops multicast and broadcast packets that violate an ACL.
#
-# 9. ARP requests to known IPs are responded directly.
+# 9. OVN generates responses to ARP requests for known IPs, except for
+# requests from a port for the port's own IP.
#
# 10. No response to ARP requests for unknown IPs.
@@ -1159,13 +1160,18 @@ for is in 1 2 3; do
sip=`ip_to_hex 192 168 0 $i$j`
tip=`ip_to_hex 192 168 0 $id$jd`
tip_unknown=`ip_to_hex 11 11 11 11`
- test_arp $s f000000000$s $sip $tip f000000000$d #9
+ if test $d != $s; then
+ reply_ha=f000000000$d
+ else
+ reply_ha=
+ fi
+ test_arp $s f000000000$s $sip $tip $reply_ha #9
test_arp $s f000000000$s $sip $tip_unknown #10
if test $jd = 3; then
# lsp[123]3 has an additional ip 192.169.0.[123]3.
tip=`ip_to_hex 192 169 0 $id$jd`
- test_arp $s f000000000$s $sip $tip f000000000$d #9
+ test_arp $s f000000000$s $sip $tip $reply_ha #9
fi
done
done
@@ -1362,7 +1368,8 @@ output(\"lp$inport\");
#
# 8. The switch drops multicast and broadcast packets that violate an ACL.
#
-# 9. ARP requests to known IPs are responded directly.
+# 9. OVN generates responses to ARP requests for known IPs, except for
+# requests from a port for the port's own IP.
#
# 10. No response to ARP requests for unknown IPs.
@@ -1413,13 +1420,14 @@ for s in 1 2 3; do
sip=192.168.0.$s
tip=192.168.0.$d
tip_unknown=11.11.11.11
- test_arp $s f0:00:00:00:00:0$s $sip $tip f0:00:00:00:00:0$d #9
+ if test $d != $s; then reply_ha=f0:00:00:00:00:0$d; else reply_ha=; fi
+ test_arp $s f0:00:00:00:00:0$s $sip $tip $reply_ha #9
test_arp $s f0:00:00:00:00:0$s $sip $tip_unknown #10
if test $d = 3; then
# lp3 has an additional ip 192.169.0.[123]3.
tip=192.169.0.$d
- test_arp $s f0:00:00:00:00:0$s $sip $tip f0:00:00:00:00:0$d #9
+ test_arp $s f0:00:00:00:00:0$s $sip $tip $reply_ha #9
fi
done