aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/node.c
diff options
context:
space:
mode:
authorParthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>2017-08-24 10:31:22 -0400
committerDavid S. Miller <davem@davemloft.net>2017-08-25 00:54:34 -0400
commit27163138b4d80e36f2006273d66b6c122d241f30 (patch)
tree7189104c04f9c6ee939528ded9ce64daf5512df9 /net/tipc/node.c
parent551143d8d954fe398324a5caa276f518466c428b (diff)
tipc: perform skb_linearize() before parsing the inner header
In tipc_rcv(), we linearize only the header and usually the packets are consumed as the nodes permit direct reception. However, if the skb contains tunnelled message due to fail over or synchronization we parse it in tipc_node_check_state() without performing linearization. This will cause link disturbances if the skb was non linear. In this commit, we perform linearization for the above messages. Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com> Reviewed-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/node.c')
-rw-r--r--net/tipc/node.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/tipc/node.c b/net/tipc/node.c
index 9b4dcb6a16b5..b113a52f8914 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -1557,6 +1557,8 @@ void tipc_rcv(struct net *net, struct sk_buff *skb, struct tipc_bearer *b)
1557 1557
1558 /* Check/update node state before receiving */ 1558 /* Check/update node state before receiving */
1559 if (unlikely(skb)) { 1559 if (unlikely(skb)) {
1560 if (unlikely(skb_linearize(skb)))
1561 goto discard;
1560 tipc_node_write_lock(n); 1562 tipc_node_write_lock(n);
1561 if (tipc_node_check_state(n, skb, bearer_id, &xmitq)) { 1563 if (tipc_node_check_state(n, skb, bearer_id, &xmitq)) {
1562 if (le->link) { 1564 if (le->link) {