[quagga-dev,15565,14/16] ripd: print md5 auth digest correctly

Message ID 1465927630-27768-14-git-send-email-chris@opensourcerouting.org
State Under Review
Headers show
Series
  • [quagga-dev,15552,01/16] zebra: fix null pointer dereference in zsend_ipv4_nexthop_lookup_mrib
Related show

Commit Message

Christian Franke June 14, 2016, 6:07 p.m.
From: Christian Franke <nobody@nowhere.ws>

The dump of the md5 hash was missing one byte of the hash.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
---
 ripd/ripd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Donald Sharp June 16, 2016, 1:43 p.m. | #1
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>

On Tue, Jun 14, 2016 at 2:07 PM, Christian Franke
<chris@opensourcerouting.org> wrote:
> From: Christian Franke <nobody@nowhere.ws>
>
> The dump of the md5 hash was missing one byte of the hash.
>
> Signed-off-by: Christian Franke <chris@opensourcerouting.org>
> ---
>  ripd/ripd.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/ripd/ripd.c b/ripd/ripd.c
> index 82b1ada..c4548fe 100644
> --- a/ripd/ripd.c
> +++ b/ripd/ripd.c
> @@ -814,9 +814,9 @@ rip_packet_dump (struct rip_packet *packet, int size, const char *sndrcv)
>                   zlog_debug ("  family 0x%X type %d (MD5 data)",
>                              ntohs (rte->family), ntohs (rte->tag));
>                   zlog_debug ("    MD5: %02X%02X%02X%02X%02X%02X%02X%02X"
> -                            "%02X%02X%02X%02X%02X%02X%02X",
> +                            "%02X%02X%02X%02X%02X%02X%02X%02X",
>                               p[0], p[1], p[2], p[3], p[4], p[5], p[6],
> -                             p[7], p[9], p[10], p[11], p[12], p[13],
> +                             p[7], p[8], p[9], p[10], p[11], p[12], p[13],
>                               p[14], p[15]);
>                 }
>               else
> --
> 2.8.0
>
>
> _______________________________________________
> Quagga-dev mailing list
> Quagga-dev@lists.quagga.net
> https://lists.quagga.net/mailman/listinfo/quagga-dev

Patch hide | download patch | download mbox

diff --git a/ripd/ripd.c b/ripd/ripd.c
index 82b1ada..c4548fe 100644
--- a/ripd/ripd.c
+++ b/ripd/ripd.c
@@ -814,9 +814,9 @@  rip_packet_dump (struct rip_packet *packet, int size, const char *sndrcv)
 		  zlog_debug ("  family 0x%X type %d (MD5 data)",
 			     ntohs (rte->family), ntohs (rte->tag));
 		  zlog_debug ("    MD5: %02X%02X%02X%02X%02X%02X%02X%02X"
-			     "%02X%02X%02X%02X%02X%02X%02X",
+			     "%02X%02X%02X%02X%02X%02X%02X%02X",
                              p[0], p[1], p[2], p[3], p[4], p[5], p[6],
-                             p[7], p[9], p[10], p[11], p[12], p[13],
+                             p[7], p[8], p[9], p[10], p[11], p[12], p[13],
                              p[14], p[15]);
 		}
 	      else