diff options
author | Jeff Morriss <jeff.morriss.ws@gmail.com> | 2013-07-26 01:35:44 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss.ws@gmail.com> | 2013-07-26 01:35:44 +0000 |
commit | 588bc03a5bc23a72c91773b3f03d3fc5468dbddb (patch) | |
tree | 1520cd75e2e7576b1c9db6c294404226b7520bd0 /epan/dissectors | |
parent | 26197c16932c3f7a388094e22a690b73f3c716b9 (diff) |
From Роман Донченко via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8977 :
In SSH, the protocol version message is terminated by CR LF. Wireshark, in the
info column, strips out the LF, but not the CR.
Attaching a patch to rectify that.
Also, as requested, update the contributor's email address in AUTHORS.
svn path=/trunk/; revision=50902
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-ssh.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/epan/dissectors/packet-ssh.c b/epan/dissectors/packet-ssh.c index 76c8410d6a..d3d55349d2 100644 --- a/epan/dissectors/packet-ssh.c +++ b/epan/dissectors/packet-ssh.c @@ -57,11 +57,11 @@ #include <epan/expert.h> /* SSH Version 1 definition , from openssh ssh1.h */ -#define SSH1_MSG_NONE 0 /* no message */ -#define SSH1_MSG_DISCONNECT 1 /* cause (string) */ +#define SSH1_MSG_NONE 0 /* no message */ +#define SSH1_MSG_DISCONNECT 1 /* cause (string) */ #define SSH1_SMSG_PUBLIC_KEY 2 /* ck,msk,srvk,hostk */ #define SSH1_CMSG_SESSION_KEY 3 /* key (BIGNUM) */ -#define SSH1_CMSG_USER 4 /* user (string) */ +#define SSH1_CMSG_USER 4 /* user (string) */ #define SSH_VERSION_UNKNOWN 0 @@ -283,7 +283,7 @@ dissect_ssh(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) conversation_t *conversation; int last_offset, offset = 0; - gboolean is_response = (pinfo->destport != pinfo->match_uint), + gboolean is_response = (pinfo->destport != pinfo->match_uint), need_desegmentation; guint version; @@ -412,7 +412,7 @@ ssh_dissect_ssh2(tvbuff_t *tvb, packet_info *pinfo, } if ((global_data->frame_key_start == 0) || - ((global_data->frame_key_start <= pinfo->fd->num) && + ((global_data->frame_key_start <= pinfo->fd->num) && ((global_data->frame_key_end == 0) || (pinfo->fd->num <= global_data->frame_key_end)))) { offset = ssh_dissect_key_exchange(tvb,pinfo, global_data, offset,ssh2_tree,is_response, @@ -804,7 +804,11 @@ ssh_dissect_protocol(tvbuff_t *tvb, packet_info *pinfo, protolen = linelen; } else { linelen = linelen - offset + 1; - protolen = linelen - 1; + + if (linelen > 1 && tvb_get_guint8(tvb, offset + linelen - 2) == '\r') + protolen = linelen - 2; + else + protolen = linelen - 1; } col_add_fstr(pinfo->cinfo, COL_INFO, "%s Protocol: %s", |