conf_addr() sets c->ip[46]no_copy_addrs conditional upon being in pasta
mode. That sort of makes sense, since address copying is only a thing for
pasta mode. However, setting the variables anyway is harmless, and
arguably more logically consistent. If we had a way of copying addresses
for passt mode (or some future mode), it would still be incorrect to do so
in these circumstances.
So, make the assignments unconditional.
Signed-off-by: David Gibson
---
conf.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/conf.c b/conf.c
index 3614776c..d1889e0c 100644
--- a/conf.c
+++ b/conf.c
@@ -1203,13 +1203,11 @@ static bool conf_addr(struct ctx *c, char *arg, uint8_t opt_n)
c->ip4.addr = *inany_v4(&addr);
c->ip4.prefix_len = prefix_len - 96;
c->ip4.addr_fixed = true;
- if (c->mode == MODE_PASTA)
- c->ip4.no_copy_addrs = true;
+ c->ip4.no_copy_addrs = true;
} else {
c->ip6.addr = addr.a6;
c->ip6.addr_fixed = true;
- if (c->mode == MODE_PASTA)
- c->ip6.no_copy_addrs = true;
+ c->ip6.no_copy_addrs = true;
}
return is_prefix;
--
2.54.0