• Xie He's avatar
    drivers/net/wan/lapbether: Set network_header before transmitting · 8d49572b
    Xie He authored
    [ Upstream commit 91244d10 ]
    
    Set the skb's network_header before it is passed to the underlying
    Ethernet device for transmission.
    
    This patch fixes the following issue:
    
    When we use this driver with AF_PACKET sockets, there would be error
    messages of:
       protocol 0805 is buggy, dev (Ethernet interface name)
    printed in the system "dmesg" log.
    
    This is because skbs passed down to the Ethernet device for transmission
    don't have their network_header properly set, and the dev_queue_xmit_nit
    function in net/core/dev.c complains about this.
    
    Reason of setting the network_header to this place (at the end of the
    Ethernet header, and at the beginning of the Ethernet payload):
    
    Because when this driver receives an skb from the Ethernet device, the
    network_header is also set at this place.
    
    Cc: Martin Schiller <ms@dev.tdt.de>
    Signed-off-by: default avatarXie He <xie.he.0141@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
    8d49572b
lapbether.c 10.6 KB