diff options
author | Jon Paul Maloy <jon.maloy@ericsson.com> | 2015-03-13 21:08:06 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-14 19:38:32 +0100 |
commit | cf2157f88a5abf1a64b8c51a737a35e918dc67e5 (patch) | |
tree | 8896dd853ffa7676faeba4423d494a17fba67db1 /net/tipc/msg.h | |
parent | tipc: add framework for node capabilities exchange (diff) | |
download | linux-cf2157f88a5abf1a64b8c51a737a35e918dc67e5.tar.xz linux-cf2157f88a5abf1a64b8c51a737a35e918dc67e5.zip |
tipc: move message validation function to msg.c
The function link_buf_validate() is in reality re-entrant and context
independent, and will in later commits be called from several locations.
Therefore, we move it to msg.c, make it outline and rename the it to
tipc_msg_validate().
We also redesign the function to make proper use of pskb_may_pull()
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/msg.h')
-rw-r--r-- | net/tipc/msg.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/tipc/msg.h b/net/tipc/msg.h index 7cece647394c..62306b8d2410 100644 --- a/net/tipc/msg.h +++ b/net/tipc/msg.h @@ -1,7 +1,7 @@ /* * net/tipc/msg.h: Include file for TIPC message header routines * - * Copyright (c) 2000-2007, 2014, Ericsson AB + * Copyright (c) 2000-2007, 2014-2015 Ericsson AB * Copyright (c) 2005-2008, 2010-2011, Wind River Systems * All rights reserved. * @@ -92,7 +92,7 @@ struct plist; struct tipc_skb_cb { void *handle; struct sk_buff *tail; - bool deferred; + bool validated; bool wakeup_pending; bool bundling; u16 chain_sz; @@ -758,6 +758,7 @@ static inline u32 msg_tot_origport(struct tipc_msg *m) } struct sk_buff *tipc_buf_acquire(u32 size); +bool tipc_msg_validate(struct sk_buff *skb); bool tipc_msg_reverse(u32 own_addr, struct sk_buff *buf, u32 *dnode, int err); void tipc_msg_init(u32 own_addr, struct tipc_msg *m, u32 user, u32 type, |