diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-11-03 10:59:05 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-11-03 10:59:05 +0000 |
commit | aa799beefd4c8fce27ceb0fd6ed143fb40859be2 (patch) | |
tree | 6e6ca07fa0c49af532b084c80a89d926a9a3bd0f /sys/net/route.h | |
parent | e5888cd56b381838e11260d5af85260b96ce1f4e (diff) |
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/net/route.h')
-rw-r--r-- | sys/net/route.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/route.h b/sys/net/route.h index 3756ef599eb..954331a2b21 100644 --- a/sys/net/route.h +++ b/sys/net/route.h @@ -1,4 +1,4 @@ -/* $OpenBSD: route.h,v 1.64 2009/09/17 13:27:24 claudio Exp $ */ +/* $OpenBSD: route.h,v 1.65 2009/11/03 10:59:04 claudio Exp $ */ /* $NetBSD: route.h,v 1.9 1996/02/13 22:00:49 christos Exp $ */ /* @@ -345,6 +345,8 @@ extern const struct sockaddr_rtin rt_defmask4; struct socket; void route_init(void); int rtable_add(u_int); +u_int rtable_l2(u_int); +void rtable_l2set(u_int, u_int); int rtable_exists(u_int); int route_output(struct mbuf *, ...); int route_usrreq(struct socket *, int, struct mbuf *, |