[NETFILTER]: Use HOPLIMIT metric as TTL of TCP reset sent by REJECT
HOPLIMIT metric is appropriate to TCP reset sent by REJECT target than hard-coded max TTL. Thanks to David S. Miller for hint. Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
0ae2cfe7f3
commit
e8eaedf2f8
|
@ -203,7 +203,7 @@ static void send_reset(struct sk_buff *oldskb, int hook)
|
|||
sizeof(struct tcphdr), 0));
|
||||
|
||||
/* Adjust IP TTL, DF */
|
||||
nskb->nh.iph->ttl = MAXTTL;
|
||||
nskb->nh.iph->ttl = dst_metric(nskb->dst, RTAX_HOPLIMIT);
|
||||
/* Set DF, id = 0 */
|
||||
nskb->nh.iph->frag_off = htons(IP_DF);
|
||||
nskb->nh.iph->id = 0;
|
||||
|
|
Loading…
Reference in New Issue