diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2023-12-08 18:41:36 +0100 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2023-12-27 19:28:35 +0100 |
commit | baf4e2c02861da71489d7b8fc6c944fe2e3b579a (patch) | |
tree | 18d5a107bdec84fadbf5161531d9cbb0a7321ba4 /util.h | |
parent | 00358b782852f5b66bf413251ead0d1ee5d724c5 (diff) | |
download | passt-baf4e2c02861da71489d7b8fc6c944fe2e3b579a.tar passt-baf4e2c02861da71489d7b8fc6c944fe2e3b579a.tar.gz passt-baf4e2c02861da71489d7b8fc6c944fe2e3b579a.tar.bz2 passt-baf4e2c02861da71489d7b8fc6c944fe2e3b579a.tar.lz passt-baf4e2c02861da71489d7b8fc6c944fe2e3b579a.tar.xz passt-baf4e2c02861da71489d7b8fc6c944fe2e3b579a.tar.zst passt-baf4e2c02861da71489d7b8fc6c944fe2e3b579a.zip |
test: Select first reported IPv6 address for guest/host comparison
If we run passt nested (a guest connected via passt to a guest
connected via passt to the host), the first guest (L1) typically has
two IPv6 addresses on the same interface: one formed from the prefix
assigned via SLAAC, and another one assigned via DHCPv6 (to match the
address on the host).
When we select addresses for comparison, in this case, we have
multiple global unicast addresses -- again, on the same interface.
Selecting the first reported one on both host and guest is not
entirely correct (in theory, the order might differ), but works
reasonably well.
Use the trick from 5beef085978e ("test: Only select a single
interface or gateway in tests") to ask jq(1) for the first address
returned by the query.
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'util.h')
0 files changed, 0 insertions, 0 deletions