diff options
author | Telire Barry <t.barry@alphalink.fr> | 2022-06-22 17:12:32 +0200 |
---|---|---|
committer | Telire Barry <t.barry@alphalink.fr> | 2022-06-22 17:12:32 +0200 |
commit | 26270ec4e1057977be1e45da1c86217e1b6357f6 (patch) | |
tree | 5d199d47f61ec0a4f8aaacfe801f5017198239f5 | |
parent | 671c54b1876b2b46a37cc587a114a2b5cf9ed2d0 (diff) | |
download | accel-ppp-26270ec4e1057977be1e45da1c86217e1b6357f6.tar.gz accel-ppp-26270ec4e1057977be1e45da1c86217e1b6357f6.zip |
ipv6_dhcp: fix create ipv6 socket inside netns
This fix allow to create the socket inside the netns for ipv6-dhcp module.
-rw-r--r-- | accel-pppd/ipv6/dhcpv6.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; |