mirror of
https://github.com/mfontanini/libtins
synced 2026-01-23 02:35:57 +01:00
Fixed bug in EthernetII when changing its inner PDU.
This commit is contained in:
@@ -154,7 +154,7 @@ void EthernetII::write_serialization(uint8_t *buffer, uint32_t total_sz, const P
|
||||
#endif
|
||||
|
||||
/* Inner type defaults to IP */
|
||||
if ((_eth.payload_type == 0) && inner_pdu()) {
|
||||
if (inner_pdu()) {
|
||||
Constants::Ethernet::e flag = Internals::pdu_flag_to_ether_type(
|
||||
inner_pdu()->pdu_type()
|
||||
);
|
||||
|
||||
@@ -193,7 +193,7 @@ Constants::Ethernet::e pdu_flag_to_ether_type(PDU::PDUType flag) {
|
||||
case PDU::PPPOE:
|
||||
return Constants::Ethernet::PPPOED;
|
||||
default:
|
||||
if(Internals::pdu_type_registered<EthernetII>(flag))
|
||||
if(Internals::pdu_type_registered<EthernetII>(flag))
|
||||
return static_cast<Constants::Ethernet::e>(
|
||||
Internals::pdu_type_to_id<EthernetII>(flag)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user