Skip to content

Commit

Permalink
ipv4: tcp: set unicast_sock uc_ttl to -1
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Eric Dumazet authored and davem330 committed Jul 22, 2012
1 parent 186e868 commit 0980e56
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/ipv4/ip_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -1476,7 +1476,8 @@ static DEFINE_PER_CPU(struct inet_sock, unicast_sock) = {
.sk_allocation = GFP_ATOMIC,
.sk_flags = (1UL << SOCK_USE_WRITE_QUEUE),
},
.pmtudisc = IP_PMTUDISC_WANT,
.pmtudisc = IP_PMTUDISC_WANT,
.uc_ttl = -1,
};

void ip_send_unicast_reply(struct net *net, struct sk_buff *skb, __be32 daddr,
Expand Down

0 comments on commit 0980e56

Please sign in to comment.