diff options
author | David S. Miller <davem@davemloft.net> | 2007-03-25 23:27:59 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:23:45 -0400 |
commit | fc910a27839584209726537698b596576940add4 (patch) | |
tree | e03b021dcb5046ffb1e8154f0f4d4bc72c4c1c1d /include/linux/skbuff.h | |
parent | ca043569390c528de4cd5ec9e07502f2bf4ecd1f (diff) |
[NETLINK]: Limit NLMSG_GOODSIZE to 8K.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r-- | include/linux/skbuff.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index f9441b5f8d13..30089adb2e78 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -39,9 +39,11 @@ | |||
39 | 39 | ||
40 | #define SKB_DATA_ALIGN(X) (((X) + (SMP_CACHE_BYTES - 1)) & \ | 40 | #define SKB_DATA_ALIGN(X) (((X) + (SMP_CACHE_BYTES - 1)) & \ |
41 | ~(SMP_CACHE_BYTES - 1)) | 41 | ~(SMP_CACHE_BYTES - 1)) |
42 | #define SKB_MAX_ORDER(X, ORDER) (((PAGE_SIZE << (ORDER)) - (X) - \ | 42 | #define SKB_WITH_OVERHEAD(X) \ |
43 | sizeof(struct skb_shared_info)) & \ | 43 | (((X) - sizeof(struct skb_shared_info)) & \ |
44 | ~(SMP_CACHE_BYTES - 1)) | 44 | ~(SMP_CACHE_BYTES - 1)) |
45 | #define SKB_MAX_ORDER(X, ORDER) \ | ||
46 | SKB_WITH_OVERHEAD((PAGE_SIZE << (ORDER)) - (X)) | ||
45 | #define SKB_MAX_HEAD(X) (SKB_MAX_ORDER((X), 0)) | 47 | #define SKB_MAX_HEAD(X) (SKB_MAX_ORDER((X), 0)) |
46 | #define SKB_MAX_ALLOC (SKB_MAX_ORDER(0, 2)) | 48 | #define SKB_MAX_ALLOC (SKB_MAX_ORDER(0, 2)) |
47 | 49 | ||