From 99a188828713d6ff9c541590b08d4e63ef52f6d7 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Tue, 16 Aug 2016 10:19:13 +0200 Subject: swconfig: revert the portmapping patches, they seem to cause a segfault Revert "kernel/swconfig: remove obsolete portmapping feature from swconfig" This reverts commit 675407baa44a8700de20b6b2857009a552a807ba. Revert "swconfig: remove obsolete portmapping feature" This reverts commit fca1eb349ef31b133a62880cbd562d6bf17500aa. Signed-off-by: John Crispin --- package/network/config/swconfig/src/cli.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'package/network/config/swconfig/src/cli.c') diff --git a/package/network/config/swconfig/src/cli.c b/package/network/config/swconfig/src/cli.c index 28b7ed8625..eab6c64742 100644 --- a/package/network/config/swconfig/src/cli.c +++ b/package/network/config/swconfig/src/cli.c @@ -41,6 +41,7 @@ enum { CMD_LOAD, CMD_HELP, CMD_SHOW, + CMD_PORTMAP, }; static void @@ -284,6 +285,10 @@ int main(int argc, char **argv) print_usage(); cmd = CMD_LOAD; ckey = argv[++i]; + } else if (!strcmp(arg, "portmap")) { + if (i + 1 < argc) + csegment = argv[++i]; + cmd = CMD_PORTMAP; } else if (!strcmp(arg, "show")) { cmd = CMD_SHOW; } else { @@ -357,6 +362,9 @@ int main(int argc, char **argv) case CMD_HELP: list_attributes(dev); break; + case CMD_PORTMAP: + swlib_print_portmap(dev, csegment); + break; case CMD_SHOW: if (cport >= 0 || cvlan >= 0) { if (cport >= 0) -- cgit v1.2.3