Kris Katterjohn wrote:
From: Patrick McHardy
Sent: 1/6/2006 5:12:33 PM
-static inline void *load_pointer(struct sk_buff *skb, int k,
- unsigned int size, void *buffer)
+static inline void *load_pointer(struct sk_buff *skb, int k, unsigned int size)
{
- if (k >= 0)
+ if (k >= 0) {
+ u32 *buffer = NULL;
return skb_header_pointer(skb, k, size, buffer);
This is wrong, skb_header_pointer needs a pointer to a buffer
to which it can copy the packet contents if they are located
in the non-linear area.
Ah, gotcha.
--- x/net/core/filter.c 2006-01-06 19:14:34.000000000 -0600
+++ y/net/core/filter.c 2006-01-06 19:14:26.000000000 -0600
@@ -51,12 +51,12 @@ static void *__load_pointer(struct sk_bu
return NULL;
}
-static inline void *load_pointer(struct sk_buff *skb, int k,
- unsigned int size, void *buffer)
+static inline void *load_pointer(struct sk_buff *skb, int k, unsigned int size)
{
- if (k >= 0)
- return skb_header_pointer(skb, k, size, buffer);
- else {
+ if (k >= 0) {
+ u32 buffer;
+ return skb_header_pointer(skb, k, size, &buffer);
This is also wrong, now you returning an address from load_pointer's
stackframe.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html