diff options
author | Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp> | 2006-01-05 21:28:57 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-01-05 21:28:57 +0100 |
commit | e8eaedf2f8b368c26aa31a5a5a623b6867ef7f2b (patch) | |
tree | 3085c59beafdf6add373be3cc484c8ce510e615a | |
parent | [NETFILTER]: nf_conntrack_l3proto_ipv4.c needs net/route.h (diff) | |
download | linux-e8eaedf2f8b368c26aa31a5a5a623b6867ef7f2b.tar.xz linux-e8eaedf2f8b368c26aa31a5a5a623b6867ef7f2b.zip |
[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>
-rw-r--r-- | net/ipv4/netfilter/ipt_REJECT.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/netfilter/ipt_REJECT.c b/net/ipv4/netfilter/ipt_REJECT.c index f057025a719e..6693526ae128 100644 --- a/net/ipv4/netfilter/ipt_REJECT.c +++ b/net/ipv4/netfilter/ipt_REJECT.c @@ -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; |