summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hartmeier <dhartmei@cvs.openbsd.org>2002-03-31 13:02:09 +0000
committerDaniel Hartmeier <dhartmei@cvs.openbsd.org>2002-03-31 13:02:09 +0000
commitaaa2303e0c9115c85b862a75f932b96d1aae47ce (patch)
treedcf88558b6850174b2dac46630585fbd763ff9b2
parentf3ce6272726529bec94d8a44482ad673c5958603 (diff)
Use ip_defttl as ttl for return-rst instead of an arbitrary hardcoded
value (128). This matches the stack's default setting and honours sysctl net.inet.ip.ttl, making RSTs generated by pf harder to distinguish from RSTs sent by the real destination.
-rw-r--r--sys/net/pf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c
index 66a74b03005..57b9e86d18e 100644
--- a/sys/net/pf.c
+++ b/sys/net/pf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf.c,v 1.199 2002/03/30 06:21:00 dhartmei Exp $ */
+/* $OpenBSD: pf.c,v 1.200 2002/03/31 13:02:08 dhartmei Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -2590,7 +2590,7 @@ pf_send_reset(int off, struct tcphdr *th, struct pf_pdesc *pd, int af)
/* Finish the IP header */
h2->ip_v = 4;
h2->ip_hl = sizeof(*h2) >> 2;
- h2->ip_ttl = 128;
+ h2->ip_ttl = ip_defttl;
h2->ip_sum = 0;
h2->ip_len = len;
h2->ip_off = 0;