diff mbox series

ulogd: printpkt: always print IPv6 protocol

Message ID 12B140AA-502D-488F-B6A2-9E9DCF1DFC71@waterwave.ch
State Accepted
Delegated to: Pablo Neira
Headers show
Series ulogd: printpkt: always print IPv6 protocol | expand

Commit Message

Andreas Jaggi Feb. 21, 2020, 6:40 a.m. UTC
Print the protocol number for protocols not known by name.

Signed-off-by: Andreas Jaggi <andreas.jaggi@waterwave.ch>
---
 util/printpkt.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Pablo Neira Ayuso Feb. 23, 2020, 9:51 p.m. UTC | #1
On Fri, Feb 21, 2020 at 07:40:36AM +0100, Andreas Jaggi wrote:
> Print the protocol number for protocols not known by name.

Applied, thanks.
diff mbox series

Patch

diff --git a/util/printpkt.c b/util/printpkt.c
index 69a47ca..2aacddb 100644
--- a/util/printpkt.c
+++ b/util/printpkt.c
@@ -355,6 +355,9 @@  static int printpkt_ipv6(struct ulogd_key *res, char *buf)
 			break;
 		}
 		break;
+	default:
+		buf_cur += sprintf(buf_cur, "PROTO=%u ",
+				   ikey_get_u8(&res[KEY_IP6_NEXTHDR]));
 	}
 
 	return buf_cur - buf;