Commit dacf233
committed
Fix crash when combining multicast traffic with VLANs
When IPv4 creates a multicast loopback copy via packet->dup(), the
EncapsulationProtocolReq tag (e.g. ieee8021qctag from PacketTagger) is
inherited. This causes MessageDispatchers to route the loopback copy
through the VLAN/Ethernet path instead of the loopback interface,
leading to a 'MacAddressReq tag is absent' error in
EthernetEncapsulation.
Fix: clear EncapsulationProtocolReq for loopback interfaces in
sendPacketToNIC(), since loopback does not perform link-layer
encapsulation.
Reasoning: IP_MULTICAST_LOOP delivers a local copy as a network-layer
datagram, not as an Ethernet frame. The looped-back copy should go
directly to local IP input and UDP delivery, bypassing link-layer
processing (MAC, VLAN tagging, FCS, etc.) entirely. Only the outward
copy sent via the selected interface should be encapsulated into an
Ethernet frame with a multicast destination MAC.1 parent 670f7cc commit dacf233
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1222 | 1222 | | |
1223 | 1223 | | |
1224 | 1224 | | |
1225 | | - | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
1226 | 1228 | | |
1227 | 1229 | | |
1228 | 1230 | | |
| |||
0 commit comments