aboutsummaryrefslogtreecommitdiff
path: root/net/l2tpv3tun/patches/010-custom_ifname.patch
diff options
context:
space:
mode:
Diffstat (limited to 'net/l2tpv3tun/patches/010-custom_ifname.patch')
-rw-r--r--net/l2tpv3tun/patches/010-custom_ifname.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/net/l2tpv3tun/patches/010-custom_ifname.patch b/net/l2tpv3tun/patches/010-custom_ifname.patch
new file mode 100644
index 000000000..14a085f7a
--- /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) {