summaryrefslogtreecommitdiff
path: root/src/ipcpd/eth
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipcpd/eth')
-rw-r--r--src/ipcpd/eth/eth.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/ipcpd/eth/eth.c b/src/ipcpd/eth/eth.c
index 114cafce..04debfd1 100644
--- a/src/ipcpd/eth/eth.c
+++ b/src/ipcpd/eth/eth.c
@@ -1200,7 +1200,7 @@ static int eth_ipcp_bootstrap(const struct ipcp_config * conf)
}
memset(&ifr, 0, sizeof(ifr));
- memcpy(ifr.ifr_name, conf->dev, strlen(conf->dev));
+ memcpy(ifr.ifr_name, conf->dev, IFNAMSIZ);
#ifdef BUILD_ETH_DIX
if (conf->ethertype < 0x0600 || conf->ethertype == 0xFFFF) {
@@ -1276,7 +1276,6 @@ static int eth_ipcp_bootstrap(const struct ipcp_config * conf)
idx = if_nametoindex(conf->dev);
if (idx == 0) {
log_err("Failed to retrieve interface index.");
- close(skfd);
return -1;
}
#endif /* __FreeBSD__ */