|
@@ -964,6 +964,13 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it,
|
|
|
*/
|
|
|
skb->ooo_okay = sk_wmem_alloc_get(sk) < SKB_TRUESIZE(1);
|
|
|
|
|
|
+ /* If we had to use memory reserve to allocate this skb,
|
|
|
+ * this might cause drops if packet is looped back :
|
|
|
+ * Other socket might not have SOCK_MEMALLOC.
|
|
|
+ * Packets not looped back do not care about pfmemalloc.
|
|
|
+ */
|
|
|
+ skb->pfmemalloc = 0;
|
|
|
+
|
|
|
skb_push(skb, tcp_header_size);
|
|
|
skb_reset_transport_header(skb);
|
|
|
|