diff options
author | Matus Fabian <matfabia@cisco.com> | 2018-04-18 01:39:17 -0700 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2018-04-18 15:12:41 +0000 |
commit | 36ed73acb16c54d556ffd2bba10f0be05cc66ffb (patch) | |
tree | 784f3b9c1f532fc500129c70587bf18618631cdd /src/plugins/nat/nat.h | |
parent | 2629c841c789eb3e23050e35d84a9998afdd91bf (diff) |
NAT44: recycle old sessions for forwarding bypass (VPP-1240)
Change-Id: I7e6b0e7e91cc032b1685f35de5d84363a85158a5
Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'src/plugins/nat/nat.h')
-rw-r--r-- | src/plugins/nat/nat.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/nat/nat.h b/src/plugins/nat/nat.h index fb4ed98f837..8d7d1738fb3 100644 --- a/src/plugins/nat/nat.h +++ b/src/plugins/nat/nat.h @@ -129,6 +129,7 @@ typedef enum { #define SNAT_SESSION_FLAG_UNKNOWN_PROTO 2 #define SNAT_SESSION_FLAG_LOAD_BALANCING 4 #define SNAT_SESSION_FLAG_TWICE_NAT 8 +#define SNAT_SESSION_FLAG_FWD_BYPASS 16 #define NAT_INTERFACE_FLAG_IS_INSIDE 1 #define NAT_INTERFACE_FLAG_IS_OUTSIDE 2 @@ -463,6 +464,12 @@ typedef struct { */ #define is_lb_session(s) (s->flags & SNAT_SESSION_FLAG_LOAD_BALANCING) +/** \brief Check if NAT session is forwarding bypass. + @param s NAT session + @return 1 if NAT session is load-balancing +*/ +#define is_fwd_bypass_session(s) (s->flags & SNAT_SESSION_FLAG_FWD_BYPASS) + /** \brief Check if NAT session is endpoint dependent. @param s NAT session @return 1 if NAT session is endpoint dependent |