diff --git a/net/xl2tpd/Makefile b/net/xl2tpd/Makefile index 4cb05bafd2..6ee96cd509 100644 --- a/net/xl2tpd/Makefile +++ b/net/xl2tpd/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=xl2tpd PKG_VERSION:=1.3.16 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_MAINTAINER:=Yousong Zhou PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=LICENSE diff --git a/net/xl2tpd/files/l2tp.sh b/net/xl2tpd/files/l2tp.sh index c565d6baa9..294c3ddecc 100644 --- a/net/xl2tpd/files/l2tp.sh +++ b/net/xl2tpd/files/l2tp.sh @@ -88,12 +88,12 @@ $mtu $pppd_options EOF - xl2tpd-control add l2tp-${interface} pppoptfile=${optfile} lns=${server} || { + xl2tpd-control add-lac l2tp-${interface} pppoptfile=${optfile} lns=${server} || { echo "xl2tpd-control: Add l2tp-$interface failed" >&2 proto_setup_failed "$interface" exit 1 } - xl2tpd-control connect l2tp-${interface} || { + xl2tpd-control connect-lac l2tp-${interface} || { echo "xl2tpd-control: Connect l2tp-$interface failed" >&2 proto_setup_failed "$interface" exit 1 @@ -106,7 +106,7 @@ proto_l2tp_teardown() { rm -f ${optfile} if [ -p /var/run/xl2tpd/l2tp-control ]; then - xl2tpd-control remove l2tp-${interface} || { + xl2tpd-control remove-lac l2tp-${interface} || { echo "xl2tpd-control: Remove l2tp-$interface failed" >&2 } fi diff --git a/net/xl2tpd/patches/0001-xl2tpd-control-fix-out-of-bound-access.patch b/net/xl2tpd/patches/0001-xl2tpd-control-fix-out-of-bound-access.patch new file mode 100644 index 0000000000..6475272df6 --- /dev/null +++ b/net/xl2tpd/patches/0001-xl2tpd-control-fix-out-of-bound-access.patch @@ -0,0 +1,26 @@ +From f94ffac18ddfe72b00ec849a34c71d6bc5bcb767 Mon Sep 17 00:00:00 2001 +From: Yousong Zhou +Date: Thu, 12 Nov 2020 14:31:23 +0800 +Subject: [PATCH] xl2tpd-control: fix out-of-bound access + +It can cause segfault when presented with unknown command name + +Fixes 90884c62 ("xl2tpd-control refactoring") +--- + xl2tpd-control.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/xl2tpd-control.c b/xl2tpd-control.c +index 1e87c93..d1df0f6 100644 +--- a/xl2tpd-control.c ++++ b/xl2tpd-control.c +@@ -83,7 +83,8 @@ struct command_t commands[] = { + {"available", &command_available, TUNNEL_NOT_REQUIRED}, + {"add-lns", &command_add_lns, TUNNEL_REQUIRED}, + {"status-lns", &command_status_lns, TUNNEL_REQUIRED}, +- {"remove-lns", &command_remove_lns, TUNNEL_REQUIRED} ++ {"remove-lns", &command_remove_lns, TUNNEL_REQUIRED}, ++ {}, + }; + + void usage() diff --git a/net/xl2tpd/patches/0002-xl2tpd-control-fix-typo-in-usage.patch b/net/xl2tpd/patches/0002-xl2tpd-control-fix-typo-in-usage.patch new file mode 100644 index 0000000000..ae5dc06494 --- /dev/null +++ b/net/xl2tpd/patches/0002-xl2tpd-control-fix-typo-in-usage.patch @@ -0,0 +1,22 @@ +From 06bd6af97055071be5ed0f83a808032688a503db Mon Sep 17 00:00:00 2001 +From: Yousong Zhou +Date: Thu, 12 Nov 2020 14:33:05 +0800 +Subject: [PATCH] xl2tpd-control: fix typo in usage + +--- + xl2tpd-control.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/xl2tpd-control.c b/xl2tpd-control.c +index d1df0f6..2e683c8 100644 +--- a/xl2tpd-control.c ++++ b/xl2tpd-control.c +@@ -96,7 +96,7 @@ void usage() + " --help show this help message\n\n" + "List of supported commands:\n" + "add-lac, status-lac, remove-lac, connect-lac, disconnect-lac\n" +- "add-lns, status-lns, remove-lns, avaliable\n\n" ++ "add-lns, status-lns, remove-lns, available\n\n" + "See xl2tpd-control(8) man page for more details.\n"); + } + diff --git a/net/xl2tpd/patches/0001-Skip-building-pfc.patch b/net/xl2tpd/patches/0003-Skip-building-pfc.patch similarity index 96% rename from net/xl2tpd/patches/0001-Skip-building-pfc.patch rename to net/xl2tpd/patches/0003-Skip-building-pfc.patch index 6ca940a456..ed40d43306 100644 --- a/net/xl2tpd/patches/0001-Skip-building-pfc.patch +++ b/net/xl2tpd/patches/0003-Skip-building-pfc.patch @@ -1,4 +1,4 @@ -From 1d11b2432b6e0f99b9f08c65b51292e1a2251975 Mon Sep 17 00:00:00 2001 +From f374c10c77d25863606566edcddaf02481f25032 Mon Sep 17 00:00:00 2001 From: Yousong Zhou Date: Fri, 18 Oct 2019 11:29:03 +0000 Subject: [PATCH] Skip building pfc