Skip to content

Instantly share code, notes, and snippets.

@rbgarga
Created December 31, 2013 11:27
Show Gist options
  • Save rbgarga/8195515 to your computer and use it in GitHub Desktop.
Save rbgarga/8195515 to your computer and use it in GitHub Desktop.
diff --git a/pfPorts/filterlog/files/print-tcp.c b/pfPorts/filterlog/files/print-tcp.c
index e4e5d51..b1056a5 100644
--- a/pfPorts/filterlog/files/print-tcp.c
+++ b/pfPorts/filterlog/files/print-tcp.c
@@ -166,16 +166,21 @@ tcp_print(struct sbuf *sbuf, register const u_char *bp, register u_int length,
sbuf_printf(sbuf, "%u:%u,", seq, seq + length);
else
sbuf_printf(sbuf, "%u,", seq);
- }
+ } else
+ sbuf_printf(sbuf, ",");
- if (flags & TH_ACK) {
+ if (flags & TH_ACK)
sbuf_printf(sbuf, "%u,", ack);
- }
+ else
+ sbuf_printf(sbuf, ",");
sbuf_printf(sbuf, "%d,", win);
if (flags & TH_URG)
sbuf_printf(sbuf, "%d,", urp);
+ else
+ sbuf_printf(sbuf, ",");
+
/*
* Handle any options.
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment