-
Notifications
You must be signed in to change notification settings - Fork 64
Open
Description
I get this error from etherparse::SlicedPacket::from_ethernet() when parsing frames from a pppoe device on an openwrt modem connected to CenturyLink:
LinuxSll(UnsupportedArpHardwareId { arp_hardware_type: 512 (PPP) })
I found that modifying etherparse to treat these like Ethernet works. I'm not completely sure this is correct. Is there also a ppp device that does not produce Ethernet frames, which would then fail in a different way? Should the ArpHardwareId be something other than PPP?
This change works for me, but has only been tested with pppoe device on my modem:
commit d44ccd08d2e36e2623ae3dd72412bd188634f9e9 (HEAD -> ppp-frame)
Author: Ben Smith <[email protected]>
Date: Wed Aug 6 22:11:56 2025 -0700
Handle PPP over Ethernet frames
diff --git a/etherparse/src/link/linux_sll_protocol_type.rs b/etherparse/src/link/linux_sll_protocol_type.rs
index fed031e..bc2f747 100644
--- a/etherparse/src/link/linux_sll_protocol_type.rs
+++ b/etherparse/src/link/linux_sll_protocol_type.rs
@@ -79,6 +79,10 @@ impl TryFrom<(ArpHardwareId, u16)> for LinuxSllProtocolType {
Ok(v) => Ok(LinuxSllProtocolType::LinuxNonstandardEtherType(v)),
Err(_) => Ok(LinuxSllProtocolType::EtherType(EtherType(protocol_type))),
},
+ ArpHardwareId::PPP => match LinuxNonstandardEtherType::try_from(protocol_type) {
+ Ok(v) => Ok(LinuxSllProtocolType::LinuxNonstandardEtherType(v)),
+ Err(_) => Ok(LinuxSllProtocolType::EtherType(EtherType(protocol_type))),
+ },
_ => Err(err::linux_sll::HeaderError::UnsupportedArpHardwareId {
arp_hardware_type: arp_hardware_id,
}),
The network device looks like:
pppoe-wan: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1492 qdisc fq_codel state UNKNOWN qlen 3
link/ppp
Metadata
Metadata
Assignees
Labels
No labels