aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat44-ed/nat44_ed.h
diff options
context:
space:
mode:
authorFilip Varga <fivarga@cisco.com>2021-10-04 14:36:05 +0200
committerOle Tr�an <otroan@employees.org>2022-01-04 12:03:17 +0000
commitaed42948510a94922566fa1a4bfb6eec281e5dee (patch)
tree5c6eb192efc72124884af13e9ccf53e26e1cf0e3 /src/plugins/nat/nat44-ed/nat44_ed.h
parentfa74a64def2132fb0c81e981547ac65888751aa9 (diff)
nat: nat44-ed pool address allocation improvement
This patch improves algorithm responsible for choosing nat pool address during dynamic session creation. Patch synchronizes nat pool address attributes with vpp interfaces doing so gives nat option to determine correct nat pool address when creating dynamic session. Improvements: * match dst address subnet and src fib with nat pool address * for output-feature also fallback match of tx_sw_if_index with nat pool address Type: improvement Change-Id: I594638bc76fc1153f582add376838b4b72ff573a Signed-off-by: Filip Varga <fivarga@cisco.com>
Diffstat (limited to 'src/plugins/nat/nat44-ed/nat44_ed.h')
-rw-r--r--src/plugins/nat/nat44-ed/nat44_ed.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/nat/nat44-ed/nat44_ed.h b/src/plugins/nat/nat44-ed/nat44_ed.h
index 9fb34aa45f1..d8cc0d3aece 100644
--- a/src/plugins/nat/nat44-ed/nat44_ed.h
+++ b/src/plugins/nat/nat44-ed/nat44_ed.h
@@ -359,7 +359,10 @@ typedef CLIB_PACKED(struct
typedef struct
{
ip4_address_t addr;
+ ip4_address_t net;
+ u32 sw_if_index;
u32 fib_index;
+ u32 addr_len;
} snat_address_t;
typedef struct