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

version 1.1, 2012/02/21 17:26:11 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;  ssize_t written;
   size_t buflen;
   
     buflen = stream_get_endp (circuit->snd_stream) + LLC_LEN + ETHER_HDR_LEN;
     if (buflen > sizeof (sock_buff))
       {
         zlog_warn ("isis_send_pdu_bcast: sock_buff size %zu is less than "
                    "output pdu size %zu on circuit %s",
                    sizeof (sock_buff), buflen, circuit->interface->name);
         return ISIS_WARNING;
       }
   
   stream_set_getp (circuit->snd_stream, 0);    stream_set_getp (circuit->snd_stream, 0);
   
   /*    /*
Line 328  isis_send_pdu_bcast (struct isis_circuit *circuit, int Line 339  isis_send_pdu_bcast (struct isis_circuit *circuit, int
           stream_get_endp (circuit->snd_stream));            stream_get_endp (circuit->snd_stream));
   
   /* now we can send this */    /* now we can send this */
  written = write (circuit->fd, sock_buff,  written = write (circuit->fd, sock_buff, buflen);
                   stream_get_endp (circuit->snd_stream)   if (written < 0)
                    + LLC_LEN + ETHER_HDR_LEN);    {
       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  
changed lines
  Added in v.1.1.1.3


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