diff options
author | Guy Harris <guy@alum.mit.edu> | 2019-06-26 13:08:51 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2019-06-26 20:38:45 +0000 |
commit | dc7b757c914761b5114954d1573aca0f6d03baae (patch) | |
tree | 80717267c8e33fc3f0bb111acbf4464adbd79797 /editcap.c | |
parent | a7052d4ea9f66de734a769689d1c36902e3fa324 (diff) |
With -T, change the packet's encapsulation type as well.
Bug: 15873
Change-Id: I8d36b0fba42481b5e27e9ad9643d3603486c3645
Reviewed-on: https://code.wireshark.org/review/33745
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'editcap.c')
-rw-r--r-- | editcap.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -1817,8 +1817,19 @@ main(int argc, char *argv[]) } /* + * If an encapsulation type was specified, override the + * encapsulation type of the packet. + * Copy and change rather than modify returned rec. + */ + if (out_frame_type != -2) { + temp_rec = *rec; + temp_rec.rec_header.packet_header.pkt_encap = out_frame_type; + rec = &temp_rec; + } + + /* * CHOP - * Copy and change rather than modify returned phdr. + * Copy and change rather than modify returned rec. */ temp_rec = *rec; handle_chopping(chop, &temp_rec.rec_header.packet_header, |