From 675174d4ba255383b213437e29b617d8f55dbc69 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Mon, 11 Oct 2021 12:01:31 +0200 Subject: conf, tap: Split netlink and pasta functions, allow interface configuration Move netlink routines to their own file, and use netlink to configure or fetch all the information we need, except for the TUNSETIFF ioctl. Move pasta-specific functions to their own file as well, add parameters and calls to configure the tap interface in the namespace. Signed-off-by: Stefano Brivio --- util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util.c') diff --git a/util.c b/util.c index 2a5c5ee..8b4d669 100644 --- a/util.c +++ b/util.c @@ -172,7 +172,7 @@ int sock_l4(struct ctx *c, int af, uint8_t proto, uint16_t port, addr6.sin6_addr = c->addr6; } else if (bind_addr == BIND_LL) { addr6.sin6_addr = c->addr6_ll; - addr6.sin6_scope_id = if_nametoindex(c->ifn); + addr6.sin6_scope_id = c->ifi; } else { addr6.sin6_addr = in6addr_any; } -- cgit v1.2.3