From 26270ec4e1057977be1e45da1c86217e1b6357f6 Mon Sep 17 00:00:00 2001 From: Telire Barry Date: Wed, 22 Jun 2022 17:12:32 +0200 Subject: ipv6_dhcp: fix create ipv6 socket inside netns This fix allow to create the socket inside the netns for ipv6-dhcp module. --- accel-pppd/ipv6/dhcpv6.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'accel-pppd') diff --git a/accel-pppd/ipv6/dhcpv6.c b/accel-pppd/ipv6/dhcpv6.c index cc7f1f35..0a0a2c10 100644 --- a/accel-pppd/ipv6/dhcpv6.c +++ b/accel-pppd/ipv6/dhcpv6.c @@ -76,7 +76,10 @@ static void ev_ses_started(struct ap_session *ses) if (a->prefix_len == 0 || IN6_IS_ADDR_UNSPECIFIED(&a->addr)) return; + net->enter_ns(); sock = net->socket(AF_INET6, SOCK_DGRAM, 0); + net->exit_ns(); + if (!sock) { log_ppp_error("dhcpv6: socket: %s\n", strerror(errno)); return; -- cgit v1.2.3