From c398ab0ac20ce5bb18351b52de51718090ae8233 Mon Sep 17 00:00:00 2001 From: dlg Date: Sat, 24 Feb 2018 08:53:36 +0000 Subject: [PATCH] make the gre flowid output always 2 chars so payloads stay lined up. --- usr.sbin/tcpdump/print-gre.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/tcpdump/print-gre.c b/usr.sbin/tcpdump/print-gre.c index b1ecc2ff8b3..93ca80b36cb 100644 --- a/usr.sbin/tcpdump/print-gre.c +++ b/usr.sbin/tcpdump/print-gre.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print-gre.c,v 1.18 2018/02/09 04:08:26 dlg Exp $ */ +/* $OpenBSD: print-gre.c,v 1.19 2018/02/24 08:53:36 dlg Exp $ */ /* * Copyright (c) 2002 Jason L. Wright (jason@thought.net) @@ -171,7 +171,7 @@ gre_print_0(const u_char *p, u_int length) /* maybe NVGRE, or key entropy? */ vsid = (key & NVGRE_VSID_MASK) >> NVGRE_VSID_SHIFT; - printf(" key=%u|%u+%0x", key, vsid, + printf(" key=%u|%u+%02x", key, vsid, (key & NVGRE_FLOWID_MASK) >> NVGRE_FLOWID_SHIFT); } -- 2.20.1