diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2023-06-02 15:02:02 +1000 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2023-06-03 07:49:17 +0200 |
commit | 429e1a7e71ad9020f0e53bc467986c55bf5c0e38 (patch) | |
tree | a6d95f8767e0b59e1e8f2f69e323c572e1fa5eed | |
parent | e3b19530e4a689f9f8e417ebf737dfca2340342b (diff) | |
download | passt-429e1a7e71ad9020f0e53bc467986c55bf5c0e38.tar passt-429e1a7e71ad9020f0e53bc467986c55bf5c0e38.tar.gz passt-429e1a7e71ad9020f0e53bc467986c55bf5c0e38.tar.bz2 passt-429e1a7e71ad9020f0e53bc467986c55bf5c0e38.tar.lz passt-429e1a7e71ad9020f0e53bc467986c55bf5c0e38.tar.xz passt-429e1a7e71ad9020f0e53bc467986c55bf5c0e38.tar.zst passt-429e1a7e71ad9020f0e53bc467986c55bf5c0e38.zip |
conf: Fix erroneous check of ip6->gw2023_06_03.429e1a7
a7359f094898 ("conf: Don't exit if sourced default route has no gateway")
was supposed to allow passt/pasta to run even if given a template interface
which has no default gateway. However a mistake in the patch means it
still requires the gateway, but doesn't require a global address for the
guest which we really do need.
This is one part (but not the only part) of the problem seen in
https://bugs.passt.top/show_bug.cgi?id=50.
Reported-by: Justin Jereza <justinjereza@gmail.com>
Fixes: a7359f094898 ("conf: Don't exit if sourced default route has no gateway")
Link: https://bugs.passt.top/show_bug.cgi?id=50
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r-- | conf.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -708,7 +708,7 @@ static unsigned int conf_ip6(unsigned int ifi, if (MAC_IS_ZERO(mac)) nl_link(0, ifi, mac, 0, 0); - if (IN6_IS_ADDR_UNSPECIFIED(&ip6->gw) || + if (IN6_IS_ADDR_UNSPECIFIED(&ip6->addr) || IN6_IS_ADDR_UNSPECIFIED(&ip6->addr_ll) || MAC_IS_ZERO(mac)) return 0; |