From 5b5e36fe52334e28cb6f0cc2a844216028b8f3ea Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sun, 8 Aug 2010 21:07:31 +0000 Subject: [PATCH] [packages] l2tpv3tun: support custom ifnames SVN-Revision: 22548 --- net/l2tpv3tun/Makefile | 2 +- net/l2tpv3tun/patches/010-custom_ifname.patch | 20 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 net/l2tpv3tun/patches/010-custom_ifname.patch diff --git a/net/l2tpv3tun/Makefile b/net/l2tpv3tun/Makefile index 568665b6a0..36ad821c5d 100644 --- a/net/l2tpv3tun/Makefile +++ b/net/l2tpv3tun/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=l2tpv3tun PKG_VERSION:=0.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=ftp://www.openl2tp.org/releases/ diff --git a/net/l2tpv3tun/patches/010-custom_ifname.patch b/net/l2tpv3tun/patches/010-custom_ifname.patch new file mode 100644 index 0000000000..14a085f7a2 --- /dev/null +++ b/net/l2tpv3tun/patches/010-custom_ifname.patch @@ -0,0 +1,20 @@ +--- a/main.c ++++ b/main.c +@@ -560,6 +560,7 @@ static void usage(void) + fprintf(stderr, " session_id ID peer_session_id ID\n"); + fprintf(stderr, " [ cookie HEXSTR ] [ peer_cookie HEXSTR ]\n"); + fprintf(stderr, " [ offset OFFSET ] [ peer_offset OFFSET ]\n"); ++ fprintf(stderr, " [ ifname IFNAME ]\n"); + fprintf(stderr, " %s del tunnel tunnel_id ID\n", L2TP_CMD_ROOT); + fprintf(stderr, " %s del session tunnel_id ID session_id ID\n", L2TP_CMD_ROOT); + fprintf(stderr, " %s show tunnel [ tunnel_id ID ]\n", L2TP_CMD_ROOT); +@@ -671,6 +672,9 @@ static int parse_args(int argc, char **a + p->peer_cookie_len = slen / 2; + if (hex2mem(*argv, p->peer_cookie, p->peer_cookie_len) < 0) + invarg("cookie must be a hex string\n", *argv); ++ } else if (strcmp(*argv, "ifname") == 0) { ++ NEXT_ARG(); ++ p->ifname = *argv; + } else if (strcmp(*argv, "tunnel") == 0) { + p->tunnel = 1; + } else if (strcmp(*argv, "session") == 0) { -- 2.30.2