nat: report correct EI per-user session limit 01/32301/5
authorMatthew Smith <mgsmith@netgate.com>
Thu, 13 May 2021 16:11:33 +0000 (11:11 -0500)
committerMatthew Smith <mgsmith@netgate.com>
Tue, 25 May 2021 13:12:01 +0000 (13:12 +0000)
commit01930f568a2472a3352ab80ea1d3b4cccf4ae0c7
treed3a1fb9738500c84babcf9fc7499731eecb82d9c
parent06274811e419bedf3179a99bed3331f0c0b951df
nat: report correct EI per-user session limit

Type: fix

When enabling the endpoint independent NAT44 plugin, user_sessions
determines the maximum number of translations that can be active for
a single inside address. If 0 is passed in, a default value is used
but 0 is still stored in the field that is used to populate reply
messages to nat44_ei_show_running_config,

At the time of enabling the plugin, if user_sessions is 0, update the
field which is used by nat44_ei_show_running_config to contain the
default per-user limit which gets used by the EI nodes.

Change-Id: I6b060d85bcd42d91db879b95a8b07c6844bcd2a5
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
src/plugins/nat/nat44-ei/nat44_ei.api
src/plugins/nat/nat44-ei/nat44_ei.c
test/test_nat44_ei.py