1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-27 20:24:26 +01:00

Fix Dot1Q serialization for non-qinq packets (#319)

This commit is contained in:
Saxon Parker
2018-12-01 16:56:16 -07:00
committed by Matias Fontanini
parent 57ac099703
commit 602ada7820
2 changed files with 13 additions and 0 deletions

View File

@@ -166,6 +166,8 @@ void EthernetII::write_serialization(uint8_t* buffer, uint32_t total_sz) {
}
// Dirty trick: Double Dot1Q is interpreted as Dot1AD
else if (type == PDU::DOT1Q) {
flag = Internals::pdu_flag_to_ether_type(type);
if (inner_pdu()->inner_pdu()) {
const PDUType inner_type = inner_pdu()->inner_pdu()->pdu_type();
if (inner_type == PDU::DOT1Q) {