Skip to content

Commit 0980e56

Browse files
Eric Dumazetdavem330
authored andcommitted
ipv4: tcp: set unicast_sock uc_ttl to -1
Set unicast_sock uc_ttl to -1 so that we select the right ttl, instead of sending packets with a 0 ttl. Bug added in commit be9f4a4 (ipv4: tcp: remove per net tcp_sock) Signed-off-by: Hiroaki SHIMODA <shimoda.hiroaki@gmail.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 186e868 commit 0980e56

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎net/ipv4/ip_output.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1476,7 +1476,8 @@ static DEFINE_PER_CPU(struct inet_sock, unicast_sock) = {
14761476
.sk_allocation = GFP_ATOMIC,
14771477
.sk_flags = (1UL << SOCK_USE_WRITE_QUEUE),
14781478
},
1479-
.pmtudisc = IP_PMTUDISC_WANT,
1479+
.pmtudisc = IP_PMTUDISC_WANT,
1480+
.uc_ttl = -1,
14801481
};
14811482

14821483
void ip_send_unicast_reply(struct net *net, struct sk_buff *skb, __be32 daddr,

0 commit comments

Comments
 (0)