ToDevice sets unknown protocol on MAC layer

Martin Dam - NDS <[email protected]> Thu, 28 Feb 2013 11:24:56 +0100
Newsgroups gmane.network.routing.click
Message-ID <[email protected]>
I am trying to create a router in Click which routes LAN packets through 
a PPP connection in linuxkernel.  My question is how a cloned interface 
interprets the received packets.

When a small IP packet captured from FromDevice is sent to 
ToDevice(ppp0, TYPE IP), a linux cooked capture header is appended (when 
observed via wireshark) with IPv4 marked in the "MAC" protocol as it 
should. However, when the packet size is bigger than the MTU and 
IPFragmenter fragment the packet, only the first packet is marked as 
IPv4. The rest is marked as unknown.

So my question is, how does a cloned interface determine the first 
protocol in the packet delivered via ToDevice? I tried using 
markIPHeader without any luck.