Message ID | 20240530150057.444585-4-hadess@hadess.net |
---|---|
State | New |
Headers | show |
Series | Fix a number of static analysis issues #3 | expand |
diff --git a/tools/l2test.c b/tools/l2test.c index 011a68c3781e..7b6c36e165da 100644 --- a/tools/l2test.c +++ b/tools/l2test.c @@ -975,6 +975,11 @@ static void do_send(int sk) buflen = (size > omtu) ? omtu : size; len = send(sk, buf + sent, buflen, 0); + if (len < 0) { + syslog(LOG_ERR, "Send failed: %s (%d)", + strerror(errno), errno); + exit(1); + } sent += len; size -= len;