diff options
author | Daniel Hartmeier <dhartmei@cvs.openbsd.org> | 2006-12-14 20:40:55 +0000 |
---|---|---|
committer | Daniel Hartmeier <dhartmei@cvs.openbsd.org> | 2006-12-14 20:40:55 +0000 |
commit | 2b769981259847e2f1670b49e3f8f6b26cd9f8b1 (patch) | |
tree | 63def1aa21707ae948e90cf468c20e5dfbd4f4fc /sys | |
parent | bb9e05f2f16c566594528b2be3401f0f1dfb65df (diff) |
in "BAD/loose state" messages, also print the packet's original sequence
number, it can differ from the sequence number being tested (for packets
without payload), and both matter in explaining why a packet mismatched.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/pf.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c index 2815ebd65a7..0753925fe71 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.520 2006/12/13 09:01:59 itojun Exp $ */ +/* $OpenBSD: pf.c,v 1.521 2006/12/14 20:40:54 dhartmei Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -4514,9 +4514,10 @@ pf_test_state_tcp(struct pf_state **state, int direction, struct pfi_kif *kif, printf("pf: loose state match: "); pf_print_state(*state); pf_print_flags(th->th_flags); - printf(" seq=%u ack=%u len=%u ackskew=%d " - "pkts=%llu:%llu\n", seq, ack, pd->p_len, ackskew, - (*state)->packets[0], (*state)->packets[1]); + printf(" seq=%u (%u) ack=%u len=%u ackskew=%d " + "pkts=%llu:%llu\n", seq, orig_seq, ack, pd->p_len, + ackskew, (*state)->packets[0], + (*state)->packets[1]); } if (dst->scrub || src->scrub) { @@ -4566,9 +4567,9 @@ pf_test_state_tcp(struct pf_state **state, int direction, struct pfi_kif *kif, printf("pf: BAD state: "); pf_print_state(*state); pf_print_flags(th->th_flags); - printf(" seq=%u ack=%u len=%u ackskew=%d " + printf(" seq=%u (%u) ack=%u len=%u ackskew=%d " "pkts=%llu:%llu dir=%s,%s\n", - seq, ack, pd->p_len, ackskew, + seq, orig_seq, ack, pd->p_len, ackskew, (*state)->packets[0], (*state)->packets[1], direction == PF_IN ? "in" : "out", direction == (*state)->direction ? "fwd" : "rev"); |