From: Jo-Philipp Wich Date: Sun, 8 Aug 2010 21:07:31 +0000 (+0000) Subject: [packages] l2tpv3tun: support custom ifnames X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;hb=5b5e36fe52334e28cb6f0cc2a844216028b8f3ea [packages] l2tpv3tun: support custom ifnames SVN-Revision: 22548 --- 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) {