diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2024-08-15 00:33:24 +0200 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2024-08-18 01:29:52 +0200 |
commit | d6f022073124edd7a46fb849a8496d6ea6ce136f (patch) | |
tree | 42e6c24228fa1de1814002a4b6840bc7d45804f6 /pasta.c | |
parent | 74e508cf797e4fdd812fed3b1b1439a6fc00ebfd (diff) | |
download | passt-d6f022073124edd7a46fb849a8496d6ea6ce136f.tar passt-d6f022073124edd7a46fb849a8496d6ea6ce136f.tar.gz passt-d6f022073124edd7a46fb849a8496d6ea6ce136f.tar.bz2 passt-d6f022073124edd7a46fb849a8496d6ea6ce136f.tar.lz passt-d6f022073124edd7a46fb849a8496d6ea6ce136f.tar.xz passt-d6f022073124edd7a46fb849a8496d6ea6ce136f.tar.zst passt-d6f022073124edd7a46fb849a8496d6ea6ce136f.zip |
netlink, pasta: Fetch link-local address from namespace interface once it's up
As soon as we bring up the interface, the Linux kernel will set up a
link-local address for it, so we can fetch it and start using right
away, if we need a link-local address to communicate to the container
before we see any traffic coming from it.
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'pasta.c')
-rw-r--r-- | pasta.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -340,6 +340,13 @@ void pasta_ns_conf(struct ctx *c) } if (c->ifi6) { + rc = nl_addr_get_ll(nl_sock_ns, c->pasta_ifi, + &c->ip6.addr_ll_seen); + if (rc < 0) { + warn("Can't get LL address from namespace: %s", + strerror(-rc)); + } + rc = nl_addr_set_ll_nodad(nl_sock_ns, c->pasta_ifi); if (rc < 0) { warn("Can't set nodad for LL in namespace: %s", |