diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2015-10-11 14:58:19 +0200 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2015-10-12 05:49:27 +0000 |
commit | 3e4f2a22f4bbc7f7c11d458f7c2dba539f1aa960 (patch) | |
tree | 86cb0c0ebdab832426e34c8eb7bacde8764e2b70 | |
parent | 77e6afaeee7a96056144911e47546c7fa6f973c0 (diff) | |
download | wireshark-3e4f2a22f4bbc7f7c11d458f7c2dba539f1aa960.tar.gz |
NTP: fix dissection of SHA1 based message authentication code
The maximum MAC length is 160 bits, not 128. MAX_MAC_LEN can be safely
increased as an extension should be > 4 bytes.
Bug: 11580
Change-Id: I0ea5a1f85d644e57315f033f09241d7a79dd3a45
Reviewed-on: https://code.wireshark.org/review/10934
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
(cherry picked from commit 52e5ada040e2697e3f3e6a43bb847481a7884609)
Reviewed-on: https://code.wireshark.org/review/10949
-rw-r--r-- | epan/dissectors/packet-ntp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-ntp.c b/epan/dissectors/packet-ntp.c index 63a2bd5431..1e26e63444 100644 --- a/epan/dissectors/packet-ntp.c +++ b/epan/dissectors/packet-ntp.c @@ -70,7 +70,7 @@ void proto_reg_handoff_ntp(void); * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * | Key Identifier (optional) (32) | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - * | Message Digest (optional) (128) | + * | Message Digest (optional) (128/160) | * | | * | | * | | @@ -461,9 +461,9 @@ static const value_string priv_rc_types[] = { static value_string_ext priv_rc_types_ext = VALUE_STRING_EXT_INIT(priv_rc_types); /* - * Maximum MAC length. + * Maximum MAC length : 160 bits MAC + 32 bits Key ID */ -#define MAX_MAC_LEN (5 * sizeof (guint32)) +#define MAX_MAC_LEN (6 * sizeof (guint32)) static int proto_ntp = -1; |