summaryrefslogtreecommitdiff
path: root/src/ipcpd
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipcpd')
-rw-r--r--src/ipcpd/shim-eth-llc/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ipcpd/shim-eth-llc/main.c b/src/ipcpd/shim-eth-llc/main.c
index 5a80aa91..d42e6fff 100644
--- a/src/ipcpd/shim-eth-llc/main.c
+++ b/src/ipcpd/shim-eth-llc/main.c
@@ -536,14 +536,14 @@ static void * eth_llc_ipcp_sdu_reader(void * o)
memset(br_addr, 0xff, MAC_SIZE * sizeof(uint8_t));
while (true) {
+ if (ipcp_get_state() != IPCP_OPERATIONAL)
+ return (void *) 0;
+
frame_len = recv(eth_llc_data.s_fd, buf,
SHIM_ETH_LLC_MAX_SDU_SIZE, 0);
if (frame_len < 0)
continue;
- if (ipcp_get_state() != IPCP_OPERATIONAL)
- return (void *) 0;
-
llc_frame = (struct eth_llc_frame *) buf;
#ifdef __FreeBSD__