conf: Fix erroneous check of ip6->gw
a7359f0948
("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:a7359f0948
("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>
This commit is contained in:
parent
e3b19530e4
commit
429e1a7e71
1 changed files with 1 additions and 1 deletions
2
conf.c
2
conf.c
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue