From 23ffb733017a791ffec43b4031e0b64ce122153d Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Sat, 8 Apr 2017 12:03:53 +0200 Subject: ipcpd: Fix wrong timeval value in LLC shim --- src/ipcpd/shim-eth-llc/main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/ipcpd/shim-eth-llc/main.c') diff --git a/src/ipcpd/shim-eth-llc/main.c b/src/ipcpd/shim-eth-llc/main.c index 5789defa..27456eb7 100644 --- a/src/ipcpd/shim-eth-llc/main.c +++ b/src/ipcpd/shim-eth-llc/main.c @@ -766,7 +766,7 @@ static int eth_llc_ipcp_bootstrap(struct dif_config * conf) int skfd; #endif #else - struct timeval tv = {0, EVENT_WAIT_TIMEOUT * MILLION}; + struct timeval tv = {0, EVENT_WAIT_TIMEOUT * 1000}; #ifdef __FreeBSD__ struct ifaddrs * ifaddr; struct ifaddrs * ifa; @@ -873,7 +873,6 @@ static int eth_llc_ipcp_bootstrap(struct dif_config * conf) memcpy(eth_llc_data.device.sll_addr, ifr.ifr_hwaddr.sa_data, MAC_SIZE); eth_llc_data.device.sll_halen = MAC_SIZE; eth_llc_data.device.sll_protocol = htons(ETH_P_ALL); - eth_llc_data.s_fd = socket(AF_PACKET, SOCK_RAW, htons(ETH_P_802_2)); log_info("Using raw socket device."); @@ -893,7 +892,7 @@ static int eth_llc_ipcp_bootstrap(struct dif_config * conf) if (setsockopt(eth_llc_data.s_fd, SOL_SOCKET, SO_RCVTIMEO, (void *) &tv, sizeof(tv))) { - log_err("Failed to set socket timeout"); + log_err("Failed to set socket timeout."); close(eth_llc_data.s_fd); return -1; } -- cgit v1.2.3