diff options
| author | Christian Franke <chris@opensourcerouting.org> | 2015-11-12 14:24:28 +0100 | 
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-03-29 20:26:34 -0400 | 
| commit | cfd1f27b7103854a6c25fd0e05ee286ce01d62e9 (patch) | |
| tree | d3ee1d766d74798da8cbd6eed582ca5a21607353 /isisd/isis_bpf.c | |
| parent | 0232bb72339c600b8f624aec82bd436aac27eff4 (diff) | |
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.c | 11 | 
1 files changed, 9 insertions, 2 deletions
diff --git a/isisd/isis_bpf.c b/isisd/isis_bpf.c index 4d5b165131..1e70cc132f 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  | 
