summaryrefslogtreecommitdiffstats
path: root/isisd/isis_bpf.c
diff options
context:
space:
mode:
authorChristian Franke <chris@opensourcerouting.org>2015-11-12 14:24:28 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-03-30 02:26:34 +0200
commitcfd1f27b7103854a6c25fd0e05ee286ce01d62e9 (patch)
treed3ee1d766d74798da8cbd6eed582ca5a21607353 /isisd/isis_bpf.c
parentisisd: fix misleading wording in log (diff)
downloadfrr-cfd1f27b7103854a6c25fd0e05ee286ce01d62e9.tar.xz
frr-cfd1f27b7103854a6c25fd0e05ee286ce01d62e9.zip
isisd: make send_lsp more robust
Signed-off-by: Christian Franke <chris@opensourcerouting.org> Tested-by: NetDEF CI System <cisystem@netdef.org>
Diffstat (limited to 'isisd/isis_bpf.c')
-rw-r--r--isisd/isis_bpf.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/isisd/isis_bpf.c b/isisd/isis_bpf.c
index 4d5b16513..1e70cc132 100644
--- a/isisd/isis_bpf.c
+++ b/isisd/isis_bpf.c
@@ -29,6 +29,7 @@
#include <net/bpf.h>
#include "log.h"
+#include "network.h"
#include "stream.h"
#include "if.h"
@@ -338,8 +339,14 @@ isis_send_pdu_bcast (struct isis_circuit *circuit, int level)
/* now we can send this */
written = write (circuit->fd, sock_buff, buflen);
-
- return ISIS_OK;
+ if (written < 0)
+ {
+ zlog_warn("IS-IS bpf: could not transmit packet on %s: %s",
+ circuit->interface->name, safe_strerror(errno));
+ if (ERRNO_IO_RETRY(errno))
+ return ISIS_WARNING;
+ return ISIS_ERROR;
+ }
}
int