diff options
author | Martin Kaiser <wireshark@kaiser.cx> | 2013-12-28 20:37:21 +0000 |
---|---|---|
committer | Martin Kaiser <wireshark@kaiser.cx> | 2013-12-28 20:37:21 +0000 |
commit | 82f9e9ec68c8974d68b58b36c2815447dfa72024 (patch) | |
tree | 4263ae62ad0878fab1dbc83e3ef01d66795c39d5 /wiretap | |
parent | d3ed64d8e33e67d483752dae9a4b75b6445c8bfe (diff) |
use the correct record length for an IPv6 record in the NRB
this is already correct in 1.8 and 1.10 and was
accidentially(?) changed in r52176
svn path=/trunk/; revision=54479
Diffstat (limited to 'wiretap')
-rw-r--r-- | wiretap/pcapng.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/wiretap/pcapng.c b/wiretap/pcapng.c index 30d178f6c3..0824114559 100644 --- a/wiretap/pcapng.c +++ b/wiretap/pcapng.c @@ -3496,8 +3496,9 @@ pcapng_write_name_resolution_block(wtap_dumper *wdh, int *err) nrb.record_type = NRES_IP6RECORD; namelen = (gint)strlen(ipv6_hash_list_entry->name) + 1; - nrb.record_len = 16 + namelen; - tot_rec_len = 16 + nrb.record_len + PADDING4(nrb.record_len); + nrb.record_len = 16 + namelen; /* 16 bytes IPv6 address length */ + /* 2 bytes record type, 2 bytes length field */ + tot_rec_len = 4 + nrb.record_len + PADDING4(nrb.record_len); if (rec_off + tot_rec_len > NRES_REC_MAX_SIZE){ /* We know the total length now; copy the block header. */ |