aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-6lowpan.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2009-10-08 16:13:53 +0000
committerBill Meier <wmeier@newsguy.com>2009-10-08 16:13:53 +0000
commit6645d6e47dfc0c1a81cda67dcf0b094b7839605c (patch)
tree390ca56076d17e60f3aa7a8243bad50af22627ef /epan/dissectors/packet-6lowpan.c
parentad7042d2a43710ac62e4f6dfe472caa16af1e0fe (diff)
Fix code so it actually pads a length to an 8 byte boundary.
svn path=/trunk/; revision=30406
Diffstat (limited to 'epan/dissectors/packet-6lowpan.c')
-rw-r--r--epan/dissectors/packet-6lowpan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-6lowpan.c b/epan/dissectors/packet-6lowpan.c
index 1d8101a4ca..166e608f75 100644
--- a/epan/dissectors/packet-6lowpan.c
+++ b/epan/dissectors/packet-6lowpan.c
@@ -1516,7 +1516,7 @@ dissect_6lowpan_iphc_nhc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gi
/* Compute the length of the extension header padded to an 8-byte alignment. */
length = sizeof(struct ip6_ext) + ext_len;
- length += ((length + 7) & 0x7);
+ length = (length + 7) & ~0x7;
/* Create the next header structure for the IPv6 extension header. */
nhdr = ep_alloc0(sizeof(struct lowpan_nhdr) + sizeof(struct ip6_ext) + length);