Skip to content

Commit

Permalink
ovn.at: Fix IPv6 periodic RA test on Windows
Browse files Browse the repository at this point in the history
One issue with this test is that MSYS mangles the shorter form of the IPv6 address.
To solve this, we switch to the longer notation of it.

Another issue is that `printf` command does not add the leading `0` to the packet.
We switch to a more platform independent `awk` substitution.

Co-authored-by: Mark Michelson <[email protected]>
Signed-off-by: Mark Michelson <[email protected]>
Signed-off-by: Alin Gabriel Serdean <[email protected]>
Acked-by: Ben Pfaff <[email protected]>
  • Loading branch information
aserdean and putnopvut committed Apr 16, 2018
1 parent e5fd03e commit 1ea1b0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/ovn.at
Original file line number Diff line number Diff line change
Expand Up @@ -9312,7 +9312,7 @@ ovs-vsctl add-br br-phys
ovn_attach n1 br-phys 192.168.0.3

ovn-nbctl lr-add ro
ovn-nbctl lrp-add ro ro-sw 00:00:00:00:00:01 aef0::1/64
ovn-nbctl lrp-add ro ro-sw 00:00:00:00:00:01 aef0:0:0:0:0:0:0:1/64

ovn-nbctl ls-add sw
ovn-nbctl lsp-add sw sw-ro
Expand Down Expand Up @@ -9381,7 +9381,7 @@ construct_expected_ra() {
local icmp=8600XXXX${ra}

local ip_len=$(expr ${#icmp} / 2)
ip_len=$(printf "%0.4x" ${ip_len})
ip_len=$(echo "$ip_len" | awk '{printf "%0.4x\n", $0}')

local ip=60000000${ip_len}3aff${src_addr}${dst_addr}${icmp}
local eth=${dst_mac}${src_mac}86dd${ip}
Expand Down

0 comments on commit 1ea1b0d

Please sign in to comment.