summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@ugent.be>2017-04-08 12:03:53 +0200
committerdimitri staessens <dimitri.staessens@ugent.be>2017-04-08 12:04:26 +0200
commit23ffb733017a791ffec43b4031e0b64ce122153d (patch)
tree3139645adfc4ebbdd087295bd686f7a25cf607c9
parent77387c269d3ea65b1edabf82698153593de34d17 (diff)
downloadouroboros-23ffb733017a791ffec43b4031e0b64ce122153d.tar.gz
ouroboros-23ffb733017a791ffec43b4031e0b64ce122153d.zip
ipcpd: Fix wrong timeval value in LLC shim
-rw-r--r--src/ipcpd/shim-eth-llc/main.c5
1 files changed, 2 insertions, 3 deletions
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;
}