diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2013-08-13 08:19:41 +0000 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2013-08-13 08:19:41 +0000 |
commit | 9ef54f5ea25eb56ef923cb4eefadfdf3a301455c (patch) | |
tree | 2e95d986126dbe22e88ed328295c35beefadf70c | |
parent | 890093e0e47d53f77742c3e2659e034b0dbe255e (diff) | |
download | wireshark-9ef54f5ea25eb56ef923cb4eefadfdf3a301455c.tar.gz |
Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9035 :
Indicate the right direction in info column
svn path=/trunk/; revision=51333
-rw-r--r-- | plugins/profinet/packet-pn-mrp.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/plugins/profinet/packet-pn-mrp.c b/plugins/profinet/packet-pn-mrp.c index ccc79ae4f9..abe1eb54af 100644 --- a/plugins/profinet/packet-pn-mrp.c +++ b/plugins/profinet/packet-pn-mrp.c @@ -188,7 +188,7 @@ dissect_PNMRP_LinkUp(tvbuff_t *tvb, int offset, static int dissect_PNMRP_LinkDown(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item) + packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 type) { guint8 mac[6]; guint16 port_role; @@ -225,9 +225,13 @@ dissect_PNMRP_LinkDown(tvbuff_t *tvb, int offset, /* Padding */ offset = dissect_pn_align4(tvb, offset, pinfo, tree); - col_append_str(pinfo->cinfo, COL_INFO, "LinkDown"); - - proto_item_append_text(item, "LinkDown"); + if (type == 0x04) { + col_append_str(pinfo->cinfo, COL_INFO, "LinkDown"); + proto_item_append_text(item, "LinkDown"); + } else { + col_append_str(pinfo->cinfo, COL_INFO, "LinkUp"); + proto_item_append_text(item, "LinkUp"); + } return offset; } @@ -420,6 +424,8 @@ dissect_PNMRP_PDU(tvbuff_t *tvb, int offset, col_append_str(pinfo->cinfo, COL_INFO, ", "); proto_item_append_text(item, ", "); + } else { + proto_item_append_text(item, " "); } switch(type) { @@ -440,7 +446,7 @@ dissect_PNMRP_PDU(tvbuff_t *tvb, int offset, break; case 0x04: case 0x05: /* dissection of up and down is identical! */ - offset = dissect_PNMRP_LinkDown(new_tvb, offset, pinfo, tree, item); + offset = dissect_PNMRP_LinkDown(new_tvb, offset, pinfo, tree, item, type); break; case 0x7f: offset = dissect_PNMRP_Option(new_tvb, offset, pinfo, tree, item, length); |