aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ipsec.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-11-09 08:16:25 +0000
committerGuy Harris <guy@alum.mit.edu>2001-11-09 08:16:25 +0000
commit45900852ffb2be6e0b454151c5d4be5dd99f4f62 (patch)
treeb84954a874ad8f5f26cf299e970f6a3cd08cf1f9 /packet-ipsec.c
parent4279815244cb4df2d63c6441d6c2073df04de62c (diff)
Fixes from Kazushi Sugyo:
1) print the payload length in AH headers correctly (the field's value is length of the payload, minus 2, divided by 2, so we have to add 2 before multiplying by 2); 2) correctly handle, in an SIOCGIFCONF list, entries whose address has an "sa_len" field less than the size of a "struct sockaddr" (the length of the address in an entry is the maximum of the real length and the size of a "struct sockaddr"). svn path=/trunk/; revision=4186
Diffstat (limited to 'packet-ipsec.c')
-rw-r--r--packet-ipsec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/packet-ipsec.c b/packet-ipsec.c
index 05ed87edb3..7a89465b3b 100644
--- a/packet-ipsec.c
+++ b/packet-ipsec.c
@@ -1,7 +1,7 @@
/* packet-ipsec.c
* Routines for IPsec/IPComp packet disassembly
*
- * $Id: packet-ipsec.c,v 1.32 2001/08/30 02:23:17 guy Exp $
+ * $Id: packet-ipsec.c,v 1.33 2001/11/09 08:16:24 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -159,7 +159,7 @@ dissect_ah_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
ipprotostr(ah.ah_nxt), ah.ah_nxt);
proto_tree_add_text(ah_tree, tvb,
offsetof(struct newah, ah_len), 1,
- "Length: %u", ah.ah_len << 2);
+ "Length: %u", (ah.ah_len + 2) << 2);
proto_tree_add_uint(ah_tree, hf_ah_spi, tvb,
offsetof(struct newah, ah_spi), 4,
(guint32)ntohl(ah.ah_spi));