When sockd transfers a file descriptor to ndhc, close the fd in sockd.

Since the transfer is conceptually a move, this is the correct thing to
do and prevents sockets from spuriously hanging around forever and
eventually exhausting the per process limit on fds.
This commit is contained in:
Nicholas J. Kain 2014-04-17 11:04:00 -04:00
parent 07cbd88049
commit 034e2bb1db

View File

@ -439,6 +439,7 @@ static void xfer_fd(int fd, char cmd)
suicide("%s: (%s) sendmsg failed: %s", client_config.interface,
__func__, strerror(errno));
}
close(fd);
}
static size_t execute_sockd(char *buf, size_t buflen)