summaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorTom Herbert <therbert@google.com>2014-05-02 16:29:38 -0700
committerDavid S. Miller <davem@davemloft.net>2014-05-05 15:26:30 -0400
commited70fcfcee953a76028bfc3f963d2167c2990020 (patch)
tree567f28e17c5a2e5a8dde4821d37a7a5d67a3c4bd /include/net
parent76ba0aae673075c77a8b775e9133c8e8b1a44563 (diff)
downloadlinux-stable-ed70fcfcee953a76028bfc3f963d2167c2990020.tar.gz
linux-stable-ed70fcfcee953a76028bfc3f963d2167c2990020.tar.bz2
linux-stable-ed70fcfcee953a76028bfc3f963d2167c2990020.zip
net: Call skb_checksum_init in IPv4
Call skb_checksum_init instead of private functions. Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/ip.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/net/ip.h b/include/net/ip.h
index 3ec2b0fb9d83..1988cefdbb70 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -342,6 +342,12 @@ static inline void ip_select_ident_more(struct sk_buff *skb, struct dst_entry *d
__ip_select_ident(iph, dst, more);
}
+static inline __wsum inet_compute_pseudo(struct sk_buff *skb, int proto)
+{
+ return csum_tcpudp_nofold(ip_hdr(skb)->saddr, ip_hdr(skb)->daddr,
+ skb->len, proto, 0);
+}
+
/*
* Map a multicast IP onto multicast MAC for type ethernet.
*/