[packages] l2tpv3tun: support custom ifnames
git-svn-id: svn://svn.openwrt.org/openwrt/packages@22548 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
b141911653
commit
c643d3e380
@ -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/
|
||||
|
20
net/l2tpv3tun/patches/010-custom_ifname.patch
Normal file
20
net/l2tpv3tun/patches/010-custom_ifname.patch
Normal file
@ -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) {
|
Loading…
x
Reference in New Issue
Block a user