Skip to content
Commit 20faa0e1 authored by Robert Lubos's avatar Robert Lubos Committed by Benjamin Cabé
Browse files

net: l2: ppp: Make PPP L2 work with packet sockets



Currently, the L2 PPP won't work with AF_PACKET socket family as it only
supports packets from AF_INET/AF_INET6 families. Because of this, it's
not possible to use AF_PACKET RAW or DGRAm sockets with PPP interfaces,
as the packets they generate have family field set to AF_PACKET.

Fix this, by verifying the LL protocol field in the PPP L2 before
passing the packet the respective PPP driver. If the AF_PACKET packet is
received, and the protocol field is set to IP/IPv6, update the packet
family to AF_INET/AF_INET6 accordingly.

Signed-off-by: default avatarRobert Lubos <robert.lubos@nordicsemi.no>
parent 81e7569f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment