Skip to content

Commit

Permalink
net: use CHECKSUM_NONE instead of magic number
Browse files Browse the repository at this point in the history
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: Cesar Eduardo Barros <cesarb@cesarb.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Cesar Eduardo Barros authored and David S. Miller committed Mar 28, 2011
1 parent f4e5bd4 commit 3e49e6d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/net/ksz884x.c
Original file line number Diff line number Diff line change
Expand Up @@ -4898,7 +4898,7 @@ static netdev_tx_t netdev_tx(struct sk_buff *skb, struct net_device *dev)
goto unlock;
}
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;
copy_old_skb(org_skb, skb);
}
Expand Down
2 changes: 1 addition & 1 deletion net/ipv6/ip6mr.c
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ static int pim6_rcv(struct sk_buff *skb)
skb_pull(skb, (u8 *)encap - skb->data);
skb_reset_network_header(skb);
skb->protocol = htons(ETH_P_IPV6);
skb->ip_summed = 0;
skb->ip_summed = CHECKSUM_NONE;
skb->pkt_type = PACKET_HOST;

skb_tunnel_rx(skb, reg_dev);
Expand Down

0 comments on commit 3e49e6d

Please sign in to comment.