Diff for /embedaddon/quagga/isisd/isis_bpf.c between versions 1.1.1.2 and 1.1.1.3

version 1.1.1.2, 2012/10/09 09:22:28 version 1.1.1.3, 2016/11/02 10:09:10
Line 29 Line 29
 #include <net/bpf.h>  #include <net/bpf.h>
   
 #include "log.h"  #include "log.h"
   #include "network.h"
 #include "stream.h"  #include "stream.h"
 #include "if.h"  #include "if.h"
   
Line 301  int Line 302  int
 isis_send_pdu_bcast (struct isis_circuit *circuit, int level)  isis_send_pdu_bcast (struct isis_circuit *circuit, int level)
 {  {
   struct ether_header *eth;    struct ether_header *eth;
  int written, buflen;  ssize_t written;
   size_t buflen;
   
   buflen = stream_get_endp (circuit->snd_stream) + LLC_LEN + ETHER_HDR_LEN;    buflen = stream_get_endp (circuit->snd_stream) + LLC_LEN + ETHER_HDR_LEN;
   if (buflen > sizeof (sock_buff))    if (buflen > sizeof (sock_buff))
     {      {
      zlog_warn ("isis_send_pdu_bcast: sock_buff size %lu is less than "      zlog_warn ("isis_send_pdu_bcast: sock_buff size %zu is less than "
                 "output pdu size %d on circuit %s",                 "output pdu size %zu on circuit %s",
                  sizeof (sock_buff), buflen, circuit->interface->name);                   sizeof (sock_buff), buflen, circuit->interface->name);
       return ISIS_WARNING;        return ISIS_WARNING;
     }      }
Line 338  isis_send_pdu_bcast (struct isis_circuit *circuit, int Line 340  isis_send_pdu_bcast (struct isis_circuit *circuit, int
   
   /* now we can send this */    /* now we can send this */
   written = write (circuit->fd, sock_buff, buflen);    written = write (circuit->fd, sock_buff, buflen);
     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;
       }
   
   return ISIS_OK;    return ISIS_OK;
 }  }

Removed from v.1.1.1.2  
changed lines
  Added in v.1.1.1.3


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>