diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2017-11-27 23:21:51 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2017-11-27 23:21:51 +0000 |
commit | 0198c84929b4b0abce53a4a09ec6a6440f59941b (patch) | |
tree | 2c85a76a50c8f68e7b58b57a8e79c68db0cda2af /sys/net | |
parent | ff68012eb06ec25db7a2f520f2b8526603bac4d5 (diff) |
The divert structure was using the port number to indicate that
divert-to or divert-reply was active. If the address was also set,
it meant divert-to. Divert packet used a separate structure. This
is confusing and makes it hard to add new features. It is better
to have a divert type that explicitly says what is configured.
Convert the pfctl(8) rule parser to divert types, kernel cleanup
will be the next step.
OK sashan@
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/pfvar.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index c68814bc989..ae849b4d594 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pfvar.h,v 1.467 2017/11/13 11:30:11 henning Exp $ */ +/* $OpenBSD: pfvar.h,v 1.468 2017/11/27 23:21:50 bluhm Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -1396,6 +1396,13 @@ struct pf_divert { u_int16_t rdomain; }; +enum pf_divert_types { + PF_DIVERT_NONE, + PF_DIVERT_TO, + PF_DIVERT_REPLY, + PF_DIVERT_PACKET +}; + /* Fragment entries reference mbuf clusters, so base the default on that. */ #define PFFRAG_FRENT_HIWAT (NMBCLUSTERS / 16) /* Number of entries */ #define PFFRAG_FRAG_HIWAT (NMBCLUSTERS / 32) /* Number of packets */ |