aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/skbuff.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r--include/linux/skbuff.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 416a2e4024b2..14b950413495 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -183,7 +183,6 @@ struct skb_shared_info {
183 * @priority: Packet queueing priority 183 * @priority: Packet queueing priority
184 * @users: User count - see {datagram,tcp}.c 184 * @users: User count - see {datagram,tcp}.c
185 * @protocol: Packet protocol from driver 185 * @protocol: Packet protocol from driver
186 * @security: Security level of packet
187 * @truesize: Buffer size 186 * @truesize: Buffer size
188 * @head: Head of buffer 187 * @head: Head of buffer
189 * @data: Data head pointer 188 * @data: Data head pointer
@@ -249,18 +248,18 @@ struct sk_buff {
249 data_len, 248 data_len,
250 mac_len, 249 mac_len,
251 csum; 250 csum;
252 unsigned char local_df,
253 cloned:1,
254 nohdr:1,
255 pkt_type,
256 ip_summed;
257 __u32 priority; 251 __u32 priority;
258 unsigned short protocol, 252 __u8 local_df:1,
259 security; 253 cloned:1,
254 ip_summed:2,
255 nohdr:1;
256 /* 3 bits spare */
257 __u8 pkt_type;
258 __u16 protocol;
260 259
261 void (*destructor)(struct sk_buff *skb); 260 void (*destructor)(struct sk_buff *skb);
262#ifdef CONFIG_NETFILTER 261#ifdef CONFIG_NETFILTER
263 unsigned long nfmark; 262 unsigned long nfmark;
264 __u32 nfcache; 263 __u32 nfcache;
265 __u32 nfctinfo; 264 __u32 nfctinfo;
266 struct nf_conntrack *nfct; 265 struct nf_conntrack *nfct;
@@ -1211,7 +1210,7 @@ static inline void *skb_header_pointer(const struct sk_buff *skb, int offset,
1211{ 1210{
1212 int hlen = skb_headlen(skb); 1211 int hlen = skb_headlen(skb);
1213 1212
1214 if (offset + len <= hlen) 1213 if (hlen - offset >= len)
1215 return skb->data + offset; 1214 return skb->data + offset;
1216 1215
1217 if (skb_copy_bits(skb, offset, buffer, len) < 0) 1216 if (skb_copy_bits(skb, offset, buffer, len) < 0)