aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/skbuff.h
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2005-04-20 01:30:14 -0400
committerDavid S. Miller <davem@davemloft.net>2005-04-20 01:30:14 -0400
commit357b40a18b04c699da1d45608436e9b76b50e251 (patch)
tree51c4480c9508a911d52a3f69bbe84ec1191fd202 /include/linux/skbuff.h
parentfd92833a52b972aafacced959f4a3f7541936a9b (diff)
[IPV6]: IPV6_CHECKSUM socket option can corrupt kernel memory
So here is a patch that introduces skb_store_bits -- the opposite of skb_copy_bits, and uses them to read/write the csum field in rawv6. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r--include/linux/skbuff.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index aa35797ebfbf..9f2d75e4f087 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1183,6 +1183,8 @@ extern unsigned int skb_checksum(const struct sk_buff *skb, int offset,
1183 int len, unsigned int csum); 1183 int len, unsigned int csum);
1184extern int skb_copy_bits(const struct sk_buff *skb, int offset, 1184extern int skb_copy_bits(const struct sk_buff *skb, int offset,
1185 void *to, int len); 1185 void *to, int len);
1186extern int skb_store_bits(const struct sk_buff *skb, int offset,
1187 void *from, int len);
1186extern unsigned int skb_copy_and_csum_bits(const struct sk_buff *skb, 1188extern unsigned int skb_copy_and_csum_bits(const struct sk_buff *skb,
1187 int offset, u8 *to, int len, 1189 int offset, u8 *to, int len,
1188 unsigned int csum); 1190 unsigned int csum);