|
@@ -1466,8 +1466,10 @@ static struct sk_buff *tcp_recv_skb(struct sock *sk, u32 seq, u32 *off)
|
|
|
|
|
|
while ((skb = skb_peek(&sk->sk_receive_queue)) != NULL) {
|
|
|
offset = seq - TCP_SKB_CB(skb)->seq;
|
|
|
- if (TCP_SKB_CB(skb)->tcp_flags & TCPHDR_SYN)
|
|
|
+ if (unlikely(TCP_SKB_CB(skb)->tcp_flags & TCPHDR_SYN)) {
|
|
|
+ pr_err_once("%s: found a SYN, please report !\n", __func__);
|
|
|
offset--;
|
|
|
+ }
|
|
|
if (offset < skb->len || (TCP_SKB_CB(skb)->tcp_flags & TCPHDR_FIN)) {
|
|
|
*off = offset;
|
|
|
return skb;
|
|
@@ -1657,8 +1659,10 @@ int tcp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int nonblock,
|
|
|
break;
|
|
|
|
|
|
offset = *seq - TCP_SKB_CB(skb)->seq;
|
|
|
- if (TCP_SKB_CB(skb)->tcp_flags & TCPHDR_SYN)
|
|
|
+ if (unlikely(TCP_SKB_CB(skb)->tcp_flags & TCPHDR_SYN)) {
|
|
|
+ pr_err_once("%s: found a SYN, please report !\n", __func__);
|
|
|
offset--;
|
|
|
+ }
|
|
|
if (offset < skb->len)
|
|
|
goto found_ok_skb;
|
|
|
if (TCP_SKB_CB(skb)->tcp_flags & TCPHDR_FIN)
|