Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3e49e6d5 authored by Cesar Eduardo Barros's avatar Cesar Eduardo Barros Committed by David S. Miller
Browse files

net: use CHECKSUM_NONE instead of magic number



Two places in the kernel were doing skb->ip_summed = 0.

Change both to skb->ip_summed = CHECKSUM_NONE, which is more readable.

Signed-off-by: default avatarCesar Eduardo Barros <cesarb@cesarb.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f4e5bd4f
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -4898,7 +4898,7 @@ static netdev_tx_t netdev_tx(struct sk_buff *skb, struct net_device *dev)
				goto unlock;
				goto unlock;
			}
			}
			skb_copy_and_csum_dev(org_skb, skb->data);
			skb_copy_and_csum_dev(org_skb, skb->data);
			org_skb->ip_summed = 0;
			org_skb->ip_summed = CHECKSUM_NONE;
			skb->len = org_skb->len;
			skb->len = org_skb->len;
			copy_old_skb(org_skb, skb);
			copy_old_skb(org_skb, skb);
		}
		}
+1 −1
Original line number Original line Diff line number Diff line
@@ -663,7 +663,7 @@ static int pim6_rcv(struct sk_buff *skb)
	skb_pull(skb, (u8 *)encap - skb->data);
	skb_pull(skb, (u8 *)encap - skb->data);
	skb_reset_network_header(skb);
	skb_reset_network_header(skb);
	skb->protocol = htons(ETH_P_IPV6);
	skb->protocol = htons(ETH_P_IPV6);
	skb->ip_summed = 0;
	skb->ip_summed = CHECKSUM_NONE;
	skb->pkt_type = PACKET_HOST;
	skb->pkt_type = PACKET_HOST;


	skb_tunnel_rx(skb, reg_dev);
	skb_tunnel_rx(skb, reg_dev);