From d4718bab1bb99bcb8d06cc920cda8fb2ae914bb2 Mon Sep 17 00:00:00 2001 From: bluhm Date: Fri, 5 Apr 2019 14:42:06 +0000 Subject: In debug mode print TCP flag names to console correctly. from Mitchell Krome --- sys/netinet/tcp_debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/netinet/tcp_debug.c') diff --git a/sys/netinet/tcp_debug.c b/sys/netinet/tcp_debug.c index 4ebf9321421..0b844e3a92f 100644 --- a/sys/netinet/tcp_debug.c +++ b/sys/netinet/tcp_debug.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_debug.c,v 1.28 2018/06/11 21:23:34 bluhm Exp $ */ +/* $OpenBSD: tcp_debug.c,v 1.29 2019/04/05 14:42:06 bluhm Exp $ */ /* $NetBSD: tcp_debug.c,v 1.10 1996/02/13 23:43:36 christos Exp $ */ /* @@ -200,7 +200,7 @@ tcp_trace(short act, short ostate, struct tcpcb *tp, struct tcpcb *otp, flags = th->th_flags; if (flags) { char *cp = "<"; -#define pf(f) { if (th->th_flags&TH_##f) { printf("%s%s", cp, "f"); cp = ","; } } +#define pf(f) { if (th->th_flags&TH_##f) { printf("%s%s", cp, #f); cp = ","; } } pf(SYN); pf(ACK); pf(FIN); pf(RST); pf(PUSH); pf(URG); printf(">"); } -- cgit v1.2.3-59-g8ed1b