diff options
author | Matus Fabian <matfabia@cisco.com> | 2018-10-11 04:28:48 -0700 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-10-12 00:00:42 +0000 |
commit | 82b4ceb8e66020f41fd6faf9765614f9dc5a3163 (patch) | |
tree | 0711773a8abbf2d7f1b285b429d8a385c2d44eed /src/plugins/nat/nat.h | |
parent | e9b558282293ee28c5eef7cb507dbe3f4a81e5af (diff) |
NAT44: identity NAT fix (VPP-1441)
Change-Id: Ic4affc54d15d08b9b730f6ec6146ee053b28b4b6
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 0549acdba3a..13467203917 100644 --- a/src/plugins/nat/nat.h +++ b/src/plugins/nat/nat.h @@ -183,6 +183,7 @@ typedef enum #define NAT_STATIC_MAPPING_FLAG_ADDR_ONLY 1 #define NAT_STATIC_MAPPING_FLAG_OUT2IN_ONLY 2 #define NAT_STATIC_MAPPING_FLAG_IDENTITY_NAT 4 +#define NAT_STATIC_MAPPING_FLAG_LB 8 /* *INDENT-OFF* */ typedef CLIB_PACKED(struct @@ -666,6 +667,12 @@ unformat_function_t unformat_snat_protocol; */ #define is_identity_static_mapping(sm) (sm->flags & NAT_STATIC_MAPPING_FLAG_IDENTITY_NAT) +/** \brief Check if NAT static mapping is load-balancing. + @param sm NAT static mapping + @return 1 if load-balancing +*/ +#define is_lb_static_mapping(sm) (sm->flags & NAT_STATIC_MAPPING_FLAG_LB) + /* logging */ #define nat_log_err(...) \ vlib_log(VLIB_LOG_LEVEL_ERR, snat_main.log_class, __VA_ARGS__) |