aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/dslite
diff options
context:
space:
mode:
authorVladimir Ratnikov <vratnikov@netgate.com>2020-04-13 06:36:19 -0400
committerOle Trøan <otroan@employees.org>2020-04-21 13:33:22 +0000
commit958919f3633f4b900d9ecabc7fc75e02014e5626 (patch)
tree906145bafdd1c0e530bda878cddb0450f76396eb /src/plugins/nat/dslite
parent16e4a4a0ae39ebc1ded1b6dba2799b176aee1828 (diff)
nat: dslite ce mode in separate config entry
Previously dslite was moved to separate plugin folder and CE mode was removed. But it still needed. This patch adds CE option to separate config entry Type: feature Signed-off-by: Vladimir Ratnikov <vratnikov@netgate.com> Change-Id: If153ae08fa385ba5a6605cb412e49bbb4d1db46c
Diffstat (limited to 'src/plugins/nat/dslite')
-rw-r--r--src/plugins/nat/dslite/dslite.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/plugins/nat/dslite/dslite.c b/src/plugins/nat/dslite/dslite.c
index e03dd0c8431..ebf8afac9f3 100644
--- a/src/plugins/nat/dslite/dslite.c
+++ b/src/plugins/nat/dslite/dslite.c
@@ -114,6 +114,21 @@ dslite_set_ce (dslite_main_t * dm, u8 set)
dm->is_ce = (set != 0);
}
+static clib_error_t *
+dslite_config (vlib_main_t * vm, unformat_input_t * input)
+{
+ dslite_main_t *dm = &dslite_main;
+
+ while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
+ {
+ if (unformat (input, "ce"))
+ dslite_set_ce (dm, 1);
+ }
+ return 0;
+}
+
+VLIB_CONFIG_FUNCTION (dslite_config, "dslite");
+
int
dslite_set_aftr_ip6_addr (dslite_main_t * dm, ip6_address_t * addr)
{