forked from osmocom/wireshark
Fix bug #5627: DHCPv6 dissector formats DUID_LLT time incorrectly
Add 30 years of seconds, not 20 years, since the DHCP_LLT time is seconds since Jan 1 2000 and epoch is 30 years before that. svn path=/trunk/; revision=35686
This commit is contained in:
parent
dc39cf712d
commit
624ebe8464
|
@ -1138,10 +1138,10 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree,
|
|||
proto_tree_add_text(subtree, tvb, off + 2, 2,
|
||||
"Hardware type: %s (%u)", arphrdtype_to_str(hwtype, "Unknown"),
|
||||
hwtype);
|
||||
/* XXX seconds since Jan 1 2000 */
|
||||
/* Packet specifies seconds since Jan 1 2000, so add 946684800U (30 years) to get back to epoch */
|
||||
proto_tree_add_text(subtree, tvb, off + 4, 4,
|
||||
"Time: %s",
|
||||
abs_time_secs_to_str(tvb_get_ntohl(tvb, off + 4)+630822816U, ABSOLUTE_TIME_LOCAL, TRUE));
|
||||
abs_time_secs_to_str(tvb_get_ntohl(tvb, off + 4)+946684800U, ABSOLUTE_TIME_LOCAL, TRUE));
|
||||
if (optlen > 8) {
|
||||
proto_tree_add_text(subtree, tvb, off + 8,
|
||||
optlen - 8, "Link-layer address: %s",
|
||||
|
|
Loading…
Reference in New Issue