diff options
author | Numan Siddique <nusiddiq@redhat.com> | 2016-02-22 15:59:37 +0530 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2016-02-25 14:22:11 -0800 |
commit | 7dc88496081cccc0b22e3e341d88d2e4867323df (patch) | |
tree | b927c5922e11ebafa3efb3a8b94379558a3805f7 /tests | |
parent | 611099dc3017879efd9ccede68307e8a24c47894 (diff) | |
download | openvswitch-7dc88496081cccc0b22e3e341d88d2e4867323df.tar.gz |
ovn-northd: Allow lport 'addresses' to store multiple ips in each set
If a logical port has two ipv4 addresses and one ipv6 address
it will be stored as ["MAC IPv41 IPv42 IPv61"] instead of
["MAC IPv41", "MAC IPv42", "MAC IPv61"].
Signed-off-by: Numan Siddique <nusiddiq@redhat.com>
[blp@ovn.org made changes to comments and ovn.at]
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ovn.at | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/tests/ovn.at b/tests/ovn.at index d0200e4e8..0e717320f 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -551,7 +551,12 @@ for i in 1 2 3; do if test $j = 1; then ovn-nbctl lport-set-addresses lp$i$j "f0:00:00:00:00:$i$j 192.168.0.$i$j" unknown else - ovn-nbctl lport-set-addresses lp$i$j "f0:00:00:00:00:$i$j 192.168.0.$i$j" + if test $j = 3; then + ip_addrs="192.168.0.$i$j fe80::ea2a:eaff:fe28:$i$j/64 192.169.0.$i$j" + else + ip_addrs="192.168.0.$i$j" + fi + ovn-nbctl lport-set-addresses lp$i$j "f0:00:00:00:00:$i$j $ip_addrs" ovn-nbctl lport-set-port-security lp$i$j f0:00:00:00:00:$i$j fi done @@ -719,6 +724,12 @@ for is in 1 2 3; do tip_unknown=`ip_to_hex 11 11 11 11` test_arp $s f000000000$s $sip $tip f000000000$d #9 test_arp $s f000000000$s $sip $tip_unknown #10 + + if test $jd = 3; then + # lport[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 + fi done done @@ -743,6 +754,17 @@ for is in 1 2 3; do done done +# set address for lp13 with invalid characters. +# lp13 should be configured with only 192.168.0.13. +ovn-nbctl lport-set-addresses lp13 "f0:00:00:00:00:13 192.168.0.13 invalid 192.169.0.13" +sip=`ip_to_hex 192 168 0 11` +tip=`ip_to_hex 192 168 0 13` +test_arp 11 f00000000011 $sip $tip f00000000013 + +tip=`ip_to_hex 192 169 0 13` +#arp request for 192.169.0.13 should be flooded +test_arp 11 f00000000011 $sip $tip + # Allow some time for packet forwarding. # XXX This can be improved. sleep 1 |