summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordimitri staessens <[email protected]>2017-04-08 10:09:23 +0000
committerSander Vrijders <[email protected]>2017-04-08 10:09:23 +0000
commitb796ca07a6068b8582b1f39b08eca3582e37dd4f (patch)
tree3139645adfc4ebbdd087295bd686f7a25cf607c9 /src
parenta9aee05ef8a0d3a992f92c71fd8a3986d85d9135 (diff)
parent23ffb733017a791ffec43b4031e0b64ce122153d (diff)
downloadouroboros-b796ca07a6068b8582b1f39b08eca3582e37dd4f.tar.gz
ouroboros-b796ca07a6068b8582b1f39b08eca3582e37dd4f.zip
Merged in dstaesse/ouroboros/be-query-timeo (pull request #473)
ipcpd: Fix wrong timeval value in LLC shim
Diffstat (limited to 'src')
-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;
}