Skip to content

Commit 866e5fd

Browse files
Jon Maloydavem330
authored andcommitted
tipc: initialize 'validated' field of received packets
The tipc_msg_validate() function leaves a boolean flag 'validated' in the validated buffer's control block, to avoid performing this action more than once. However, at reception of new packets, the position of this field may already have been set by lower layer protocols, so that the packet is erroneously perceived as already validated by TIPC. We fix this by initializing the said field to 'false' before performing the initial validation. Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 7b37947 commit 866e5fd

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎net/tipc/node.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1807,6 +1807,7 @@ void tipc_rcv(struct net *net, struct sk_buff *skb, struct tipc_bearer *b)
18071807
__skb_queue_head_init(&xmitq);
18081808

18091809
/* Ensure message is well-formed before touching the header */
1810+
TIPC_SKB_CB(skb)->validated = false;
18101811
if (unlikely(!tipc_msg_validate(&skb)))
18111812
goto discard;
18121813
hdr = buf_msg(skb);

0 commit comments

Comments
 (0)