diff options
author | Anders Broman <anders.broman@ericsson.com> | 2009-08-24 09:05:23 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2009-08-24 09:05:23 +0000 |
commit | 553ef572241588c899f6e08dbf5a8fe4d92e5799 (patch) | |
tree | f1bd2f0112ae0b815663929f596662bb4d9115e2 /epan | |
parent | 60022bc5f200f3db70efd5c5828647082ef21dab (diff) |
From: : " Michael"
packet-tcp marks a row as unwritable if there is more
than 1 PDU in a packet to prevent overwriting of the
protocol column.
However this breaks the proto,colinfo tap which checks
rows are writable or dies EVEN if it doesn't alter anything.
Suggested patch attached to restore the initial value
after all PDUs have been processed.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3675
svn path=/trunk/; revision=29535
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-tcp.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c index e7128d2ebe..2627fd0d1a 100644 --- a/epan/dissectors/packet-tcp.c +++ b/epan/dissectors/packet-tcp.c @@ -1548,6 +1548,7 @@ desegment_tcp(tvbuff_t *tvb, packet_info *pinfo, int offset, gint nbytes; proto_item *item; struct tcp_multisegment_pdu *msp; + gboolean cleared_writable; again: ipfd_head=NULL; @@ -1918,12 +1919,21 @@ again: * <Protocol> to <TCP> * XXX There is no good way to block the PROTOCOL column * from being changed yet so we set the entire row unwritable. + * The flag cleared_writable stores the initial state. */ col_set_fence(pinfo->cinfo, COL_INFO); + cleared_writable |= col_get_writable(pinfo->cinfo); col_set_writable(pinfo->cinfo, FALSE); offset += another_pdu_follows; seq += another_pdu_follows; goto again; + } else { + /* remove any blocking set above otherwise the + * proto,colinfo tap will break + */ + if(cleared_writable){ + col_set_writable(pinfo->cinfo, TRUE); + } } } |