aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/msg.h
diff options
context:
space:
mode:
authorJon Paul Maloy <jon.maloy@ericsson.com>2015-03-13 16:08:06 -0400
committerDavid S. Miller <davem@davemloft.net>2015-03-14 14:38:32 -0400
commitcf2157f88a5abf1a64b8c51a737a35e918dc67e5 (patch)
tree8896dd853ffa7676faeba4423d494a17fba67db1 /net/tipc/msg.h
parent7764d6e83d2c3b50d9282f12144ebb10418c056e (diff)
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.h5
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 @@
1/* 1/*
2 * net/tipc/msg.h: Include file for TIPC message header routines 2 * net/tipc/msg.h: Include file for TIPC message header routines
3 * 3 *
4 * Copyright (c) 2000-2007, 2014, Ericsson AB 4 * Copyright (c) 2000-2007, 2014-2015 Ericsson AB
5 * Copyright (c) 2005-2008, 2010-2011, Wind River Systems 5 * Copyright (c) 2005-2008, 2010-2011, Wind River Systems
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
@@ -92,7 +92,7 @@ struct plist;
92struct tipc_skb_cb { 92struct tipc_skb_cb {
93 void *handle; 93 void *handle;
94 struct sk_buff *tail; 94 struct sk_buff *tail;
95 bool deferred; 95 bool validated;
96 bool wakeup_pending; 96 bool wakeup_pending;
97 bool bundling; 97 bool bundling;
98 u16 chain_sz; 98 u16 chain_sz;
@@ -758,6 +758,7 @@ static inline u32 msg_tot_origport(struct tipc_msg *m)
758} 758}
759 759
760struct sk_buff *tipc_buf_acquire(u32 size); 760struct sk_buff *tipc_buf_acquire(u32 size);
761bool tipc_msg_validate(struct sk_buff *skb);
761bool tipc_msg_reverse(u32 own_addr, struct sk_buff *buf, u32 *dnode, 762bool tipc_msg_reverse(u32 own_addr, struct sk_buff *buf, u32 *dnode,
762 int err); 763 int err);
763void tipc_msg_init(u32 own_addr, struct tipc_msg *m, u32 user, u32 type, 764void tipc_msg_init(u32 own_addr, struct tipc_msg *m, u32 user, u32 type,