summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_subr.c
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2009-11-03 10:59:04 +0000
committerclaudio <claudio@openbsd.org>2009-11-03 10:59:04 +0000
commit7d3e2ec58b6d4be05995eca25f2bb0f69aabb677 (patch)
tree4f9f5ad68c6b02e17c9c68c946ecdcff5d429b90 /sys/netinet/tcp_subr.c
parentDon't need regex.h and remove two declarations that are now in smtpd.h. (diff)
downloadwireguard-openbsd-7d3e2ec58b6d4be05995eca25f2bb0f69aabb677.tar.xz
wireguard-openbsd-7d3e2ec58b6d4be05995eca25f2bb0f69aabb677.zip
rtables are stacked on rdomains (it is possible to have multiple routing
tables on top of a rdomain) but until now our code was a crazy mix so that it was impossible to correctly use rtables in that case. Additionally pf(4) only knows about rtables and not about rdomains. This is especially bad when tracking (possibly conflicting) states in various domains. This diff fixes all or most of these issues. It adds a lookup function to get the rdomain id based on a rtable id. Makes pf understand rdomains and allows pf to move packets between rdomains (it is similar to NAT). Because pf states now track the rdomain id as well it is necessary to modify the pfsync wire format. So old and new systems will not sync up. A lot of help by dlg@, tested by sthen@, jsg@ and probably more OK dlg@, mpf@, deraadt@
Diffstat (limited to 'sys/netinet/tcp_subr.c')
-rw-r--r--sys/netinet/tcp_subr.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index 92ac414980b..b5d91f7253b 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_subr.c,v 1.107 2009/08/10 10:13:43 claudio Exp $ */
+/* $OpenBSD: tcp_subr.c,v 1.108 2009/11/03 10:59:04 claudio Exp $ */
/* $NetBSD: tcp_subr.c,v 1.22 1996/02/13 23:44:00 christos Exp $ */
/*
@@ -832,8 +832,7 @@ tcp_ctlinput(cmd, sa, v)
* route (traditional PMTUD).
*/
tp->t_flags &= ~TF_PMTUD_PEND;
- /* XXX inherit rdomain from PCB */
- icmp_mtudisc(icp, 0);
+ icmp_mtudisc(icp, inp->inp_rdomain);
} else {
/*
* Record the information got in the ICMP