Explorar o código

net: hsr/prp: fix the protocol 892f is buggy log

In the presence of an hsr/prp interface when an application
sends an ethernet frame over a raw ethernet socket, using
multicast MAC address, following logs seen.

 [ 3222.401202] protocol 892f is buggy, dev eth2

This is caused when supervision frames are sent periodically
and also a raw socket is sending packets from user space. This
is due to a check in net/dev.c, dev_queue_xmit_nit(), that print
a log message whenever the network header offset is less than
the data offset in the SKB. As per header description,
dev_queue_xmit_nit() function is called to present the egress
Ethernet frame to any network taps which are essentially
implemented using sockets. So a fix/workaround is to reset
the network_header of the SKB similar to the code in net/ipv4/arp.c
that sends the ARP packets.

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Murali Karicheri %!s(int64=7) %!d(string=hai) anos
pai
achega
f62cf7d394
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      net/hsr-prp/hsr_prp_device.c

+ 1 - 0
net/hsr-prp/hsr_prp_device.c

@@ -283,6 +283,7 @@ static void send_supervision_frame(struct hsr_prp_port *master,
 			    skb->dev->dev_addr, skb->len) <= 0)
 		goto out;
 	skb_reset_mac_header(skb);
+	skb_reset_network_header(skb);
 
 	if (proto_ver == HSR_V1) {
 		hsr_tag = skb_put(skb, sizeof(struct hsr_tag));