]> git.puffer.fish Git - mirror/frr.git/commitdiff
*: fix signedness mix-ups
authorDavid Lamparter <equinox@opensourcerouting.org>
Tue, 3 Mar 2015 07:55:26 +0000 (08:55 +0100)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 7 Jun 2016 12:47:49 +0000 (08:47 -0400)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 21401f3215be26dcb0f787105f5907745498e966)

isisd/isis_bpf.c
isisd/isis_lsp.c
isisd/isis_pdu.c
isisd/isis_pfpacket.c
lib/md5.c
lib/md5.h

index 61b1e05eb279620aa6e4f0202d31c36ad5e44694..889b4c30991cb0f3e71946dd0c9c9a5f4fb3aff8 100644 (file)
@@ -302,13 +302,14 @@ int
 isis_send_pdu_bcast (struct isis_circuit *circuit, int level)
 {
   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;
   if (buflen > sizeof (sock_buff))
     {
-      zlog_warn ("isis_send_pdu_bcast: sock_buff size %lu is less than "
-                "output pdu size %d on circuit %s",
+      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;
     }
index 6c3d7c00ffd8769a3ad59076ab63ec7326e34cee..ec3bc1d2bf1268156112488a7c2e150a7132bab5 100644 (file)
@@ -393,7 +393,7 @@ lsp_auth_update (struct isis_lsp *lsp)
   /* Compute autentication value */
   hmac_md5 (STREAM_DATA (lsp->pdu), stream_get_endp(lsp->pdu),
             (unsigned char *) &passwd->passwd, passwd->len,
-            (caddr_t) &hmac_md5_hash);
+            (unsigned char *) &hmac_md5_hash);
   /* Copy the hash into the stream */
   memcpy (STREAM_DATA (lsp->pdu) + lsp->auth_tlv_offset + 3,
           hmac_md5_hash, ISIS_AUTH_MD5_SIZE);
index 70bc004b11c91fde556e255dab2d46102d975fc3..aa5f3552c82f42947c6a62ec7f2a5345871ceca4 100644 (file)
@@ -204,7 +204,7 @@ authentication_check (struct isis_passwd *remote, struct isis_passwd *local,
       /* Compute the digest */
       hmac_md5 (STREAM_DATA (stream), stream_get_endp (stream),
                 (unsigned char *) &(local->passwd), local->len,
-                (caddr_t) &digest);
+                (unsigned char *) &digest);
       /* Copy back the authentication value after the check */
       memcpy (STREAM_DATA (stream) + auth_tlv_offset + 3,
               remote->passwd, ISIS_AUTH_MD5_SIZE);
@@ -2416,7 +2416,7 @@ send_hello (struct isis_circuit *circuit, int level)
       hmac_md5 (STREAM_DATA (circuit->snd_stream),
                 stream_get_endp (circuit->snd_stream),
                 (unsigned char *) &circuit->passwd.passwd, circuit->passwd.len,
-                (caddr_t) &hmac_md5_hash);
+                (unsigned char *) &hmac_md5_hash);
       /* Copy the hash into the stream */
       memcpy (STREAM_DATA (circuit->snd_stream) + auth_tlv_offset + 3,
               hmac_md5_hash, ISIS_AUTH_MD5_SIZE);
@@ -2614,7 +2614,7 @@ build_csnp (int level, u_char * start, u_char * stop, struct list *lsps,
       hmac_md5 (STREAM_DATA (circuit->snd_stream),
                 stream_get_endp(circuit->snd_stream),
                 (unsigned char *) &passwd->passwd, passwd->len,
-                (caddr_t) &hmac_md5_hash);
+                (unsigned char *) &hmac_md5_hash);
       /* Copy the hash into the stream */
       memcpy (STREAM_DATA (circuit->snd_stream) + auth_tlv_offset + 3,
               hmac_md5_hash, ISIS_AUTH_MD5_SIZE);
@@ -2947,7 +2947,7 @@ build_psnp (int level, struct isis_circuit *circuit, struct list *lsps)
       hmac_md5 (STREAM_DATA (circuit->snd_stream),
                 stream_get_endp(circuit->snd_stream),
                 (unsigned char *) &passwd->passwd, passwd->len,
-                (caddr_t) &hmac_md5_hash);
+                (unsigned char *) &hmac_md5_hash);
       /* Copy the hash into the stream */
       memcpy (STREAM_DATA (circuit->snd_stream) + auth_tlv_offset + 3,
               hmac_md5_hash, ISIS_AUTH_MD5_SIZE);
index 46c8edd68c313d2eb01200ba968ad1506af3ddb1..2427047b38136d8ab764aeb017f8a92683b772ba 100644 (file)
@@ -55,8 +55,8 @@ u_char ALL_L2_ISS[6] = { 0x01, 0x80, 0xC2, 0x00, 0x00, 0x15 };
 u_char ALL_ISS[6] = { 0x09, 0x00, 0x2B, 0x00, 0x00, 0x05 };
 u_char ALL_ESS[6] = { 0x09, 0x00, 0x2B, 0x00, 0x00, 0x04 };
 
-static char discard_buff[8192];
-static char sock_buff[8192];
+static uint8_t discard_buff[8192];
+static uint8_t sock_buff[8192];
 
 /*
  * if level is 0 we are joining p2p multicast
index 80522b6dd8ef2e94429eeb8f5acd05b333939b67..d758de2a287018268dfb203ab82b5b633226a101 100644 (file)
--- a/lib/md5.c
+++ b/lib/md5.c
@@ -306,7 +306,7 @@ unsigned char*  text;                       /* pointer to data stream */
 int             text_len;              /* length of data stream */
 unsigned char*  key;                   /* pointer to authentication key */
 int             key_len;               /* length of authentication key */
-caddr_t         digest;                /* caller digest to be filled in */
+uint8_t*        digest;                        /* caller digest to be filled in */
 
 {
     MD5_CTX context;
index a03bf22a22cd09a9c3bbdbb909776772bafd665d..4e5ffbd9e3147cb40a0c248937b3a1fe74eeb4b0 100644 (file)
--- a/lib/md5.h
+++ b/lib/md5.h
@@ -84,6 +84,6 @@ do {                          \
 
 /* From RFC 2104 */
 void hmac_md5(unsigned char* text, int text_len, unsigned char* key,
-              int key_len, caddr_t digest);
+              int key_len, uint8_t *digest);
 
 #endif /* ! _LIBZEBRA_MD5_H_*/