Diff between aa54087f13d54320f57473b5a8e6d979314266bc and ccec5e8ef171e87ded5a6caf8caee7f1e2731552

Changed Files

File Additions Deletions Status
tools/l2test.c +5 -0 modified

Full Patch

diff --git a/tools/l2test.c b/tools/l2test.c
index 011a68c..7b6c36e 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;