提交 27163138 编写于 作者: P Parthasarathy Bhuvaragan 提交者: David S. Miller

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: NParthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
Reviewed-by: NJon Maloy <jon.maloy@ericsson.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 551143d8
...@@ -1557,6 +1557,8 @@ void tipc_rcv(struct net *net, struct sk_buff *skb, struct tipc_bearer *b) ...@@ -1557,6 +1557,8 @@ void tipc_rcv(struct net *net, struct sk_buff *skb, struct tipc_bearer *b)
/* Check/update node state before receiving */ /* Check/update node state before receiving */
if (unlikely(skb)) { if (unlikely(skb)) {
if (unlikely(skb_linearize(skb)))
goto discard;
tipc_node_write_lock(n); tipc_node_write_lock(n);
if (tipc_node_check_state(n, skb, bearer_id, &xmitq)) { if (tipc_node_check_state(n, skb, bearer_id, &xmitq)) {
if (le->link) { if (le->link) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册