summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordhartmei <dhartmei@openbsd.org>2002-03-31 13:02:08 +0000
committerdhartmei <dhartmei@openbsd.org>2002-03-31 13:02:08 +0000
commit374acf02d94811d825ae3b133fb63676794837d4 (patch)
tree4d8b3ae5923d6efc8b7e0e6ece123f5e9e9f8eb3
parentLimit pci register map size to 256k (diff)
downloadwireguard-openbsd-374acf02d94811d825ae3b133fb63676794837d4.tar.xz
wireguard-openbsd-374acf02d94811d825ae3b133fb63676794837d4.zip
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;