Skip to content

Commit

Permalink
Set socket's close-on-exec flag.
Browse files Browse the repository at this point in the history
Signed-off-by: Tom Carroll <[email protected]>
  • Loading branch information
tomc797 committed May 14, 2023
1 parent 30e4605 commit 24176d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion programs/ziti-edge-tunnel/netif_driver/linux/tun.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ static void init_dns_maintainer(uv_loop_t *loop, const char *tun_name, uint32_t
local.nl_family = AF_NETLINK;
local.nl_groups = RTMGRP_LINK;// | RTMGRP_IPV4_ROUTE;

int s = socket(AF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE);
int s = socket(AF_NETLINK, SOCK_DGRAM|SOCK_CLOEXEC, NETLINK_ROUTE);
if ( s < 0) {
ZITI_LOG(ERROR, "failed to open netlink socket: %d/%s", errno, strerror(errno));
}
Expand Down

0 comments on commit 24176d2

Please sign in to comment.