diff options
author | Juraj Sloboda <jsloboda@cisco.com> | 2017-04-14 03:24:45 +0200 |
---|---|---|
committer | Ole Trøan <otroan@employees.org> | 2017-04-19 07:06:16 +0000 |
commit | d367768270a3d19447af1a7059068e1f20fd15a6 (patch) | |
tree | e37a9d4f2e400892008c1750e9ff854007bf2ffa /src/plugins/snat/snat.c | |
parent | 977c1cbc1d37945391dc65848ab819467ad9efd4 (diff) |
Support ping from outside network in 1:1 NAT (VPP-695)
Change-Id: Iec8fd4c2bd26874bd8bda82172af797e9b92592c
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
Diffstat (limited to 'src/plugins/snat/snat.c')
-rw-r--r-- | src/plugins/snat/snat.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/snat/snat.c b/src/plugins/snat/snat.c index 24ef5df9a2f..8569b041b49 100644 --- a/src/plugins/snat/snat.c +++ b/src/plugins/snat/snat.c @@ -1903,13 +1903,15 @@ void snat_free_outside_address_and_port (snat_main_t * sm, * @param mapping External or local address and port of the matched mapping. * @param by_external If 0 match by local address otherwise match by external * address. + * @param is_addr_only If matched mapping is address only * * @returns 0 if match found otherwise 1. */ int snat_static_mapping_match (snat_main_t * sm, snat_session_key_t match, snat_session_key_t * mapping, - u8 by_external) + u8 by_external, + u8 *is_addr_only) { clib_bihash_kv_8_8_t kv, value; snat_static_mapping_t *m; @@ -1955,6 +1957,9 @@ int snat_static_mapping_match (snat_main_t * sm, mapping->fib_index = sm->outside_fib_index; } + if (PREDICT_FALSE(is_addr_only != 0)) + *is_addr_only = m->addr_only; + return 0; } |