]> git.pld-linux.org Git - packages/vtun.git/blame - vtun-iproute.patch
- added conditional --without ssl; I need it, OK?
[packages/vtun.git] / vtun-iproute.patch
CommitLineData
aa49757d 1diff -uNr vtun-2.5b1/cfg_file.y vtun-2.5b1-iproute/cfg_file.y
2--- vtun-2.5b1/cfg_file.y Thu Jul 26 03:17:47 2001
3+++ vtun-2.5b1-iproute/cfg_file.y Tue Aug 21 01:11:41 2001
4@@ -74,7 +74,7 @@
5 %token K_PASSWD K_PROG K_PPP K_SPEED K_IFCFG K_FWALL K_ROUTE K_DEVICE
6 %token K_MULTI K_SRCADDR K_IFACE K_ADDR
7 %token K_TYPE K_PROT K_COMPRESS K_ENCRYPT K_KALIVE K_STAT
8-%token K_UP K_DOWN K_SYSLOG
9+%token K_UP K_DOWN K_SYSLOG K_IPROUTE
10
11 %token <str> K_HOST K_ERROR
12 %token <str> WORD PATH STRING
13@@ -175,6 +175,11 @@
14 vtun.fwall = strdup($2);
15 }
16
17+ | K_IPROUTE PATH {
18+ free(vtun.iproute);
19+ vtun.iproute = strdup($2);
20+ }
21+
22 | K_SYSLOG syslog_opt
23
24 | K_PERSIST NUM {
25@@ -418,6 +423,11 @@
26 VTUN_CMD_WAIT);
27 }
28
29+ | K_IPROUTE STRING {
30+ add_cmd(parse_cmds, strdup(vtun.iproute),strdup($2),
31+ VTUN_CMD_WAIT);
32+ }
33+
34 | K_ERROR {
35 cfg_error("Unknown cmd '%s'",$1);
36 YYABORT;
37diff -uNr vtun-2.5b1/cfg_kwords.h vtun-2.5b1-iproute/cfg_kwords.h
38--- vtun-2.5b1/cfg_kwords.h Mon Jun 11 00:48:38 2001
39+++ vtun-2.5b1-iproute/cfg_kwords.h Tue Aug 21 01:04:15 2001
40@@ -53,6 +53,7 @@
41 { "ifcfg", K_IFCFG },
42 { "firewall", K_FWALL },
43 { "route", K_ROUTE },
44+ { "ip", K_IPROUTE },
45 { "keepalive",K_KALIVE },
46 { "stat", K_STAT },
47 { "syslog", K_SYSLOG },
48diff -uNr vtun-2.5b1/main.c vtun-2.5b1-iproute/main.c
49--- vtun-2.5b1/main.c Mon Jun 11 00:48:38 2001
50+++ vtun-2.5b1-iproute/main.c Tue Aug 21 01:08:44 2001
51@@ -67,6 +67,7 @@
52 vtun.ifcfg = strdup("/sbin/ifconfig");
53 vtun.route = strdup("/sbin/route");
54 vtun.fwall = strdup("/sbin/ipchains");
55+ vtun.iproute = strdup("/sbin/ip");
56
57 vtun.svr_name = NULL;
58 vtun.svr_port = -1;
59diff -uNr vtun-2.5b1/vtun.h vtun-2.5b1-iproute/vtun.h
60--- vtun-2.5b1/vtun.h Mon Jun 11 00:48:38 2001
61+++ vtun-2.5b1-iproute/vtun.h Tue Aug 21 01:07:27 2001
62@@ -167,6 +167,7 @@
63 char *ifcfg; /* Command to configure net devices */
64 char *route; /* Command to configure routing */
65 char *fwall; /* Command to configure FireWall */
66+ char *iproute; /* iproute command */
67
68 char *svr_name; /* Server's host name */
69 int svr_port; /* Server's port */
3d718722 70diff -uNr vtun-2.5b1/vtund.conf vtun-2.5b1-iproute/vtund.conf
71--- vtun-2.5b1/vtund.conf Mon Jun 11 00:48:38 2001
72+++ vtun-2.5b1-iproute/vtund.conf Tue Aug 21 01:49:01 2001
73@@ -242,6 +242,7 @@
74 ifconfig /sbin/ifconfig;
75 route /sbin/route;
76 firewall /sbin/ipchains;
77+ ip /sbin/ip;
78 }
79
80 # Default session options
81@@ -267,6 +268,25 @@
82 };
83 }
84
85+# the same as above, but with iproute2 command
86+cobra {
87+ pass Ma&^TU; # Password
88+ type tun; # IP tunnel
89+ proto udp; # UDP protocol
90+ comp lzo:9; # LZO compression level 9
91+ encr yes; # Encryption
92+ keepalive yes; # Keep connection alive
93+
94+ up {
95+ # Connection is Up
96+
97+ # 10.3.0.1 - local, 10.3.0.2 - remote
98+ ip "link set %% up multicast off mtu 1450";
99+ ip "-family inet addr add 10.3.0.1 peer 10.3.0.2 dev %%";
100+ };
101+}
102+
103+
104 # Ethernet example. Session 'lion'.
105 lion {
106 pass Ma&^TU; # Password
107@@ -362,6 +382,7 @@
108 ifconfig /sbin/ifconfig;
109 route /sbin/route;
110 firewall /sbin/ipchains;
111+ ip /sbin/ip;
112 }
113
114 # TUN example. Session 'cobra'.
115@@ -376,6 +397,19 @@
116 ifconfig "%% 10.3.0.2 pointopoint 10.3.0.1 mtu 1450";
117 };
118 }
119+# same as above, but with iproute2 command
120+cobra {
121+ pass Ma&^TU; # Password
122+ device tun1; # Device tun1
123+ persist yes; # Persist mode
124+ up {
125+ # Connection is Up
126+
127+ # Assign IP addresses.
128+ ip "link set %% up multicast off mtu 1450";
129+ ip "-family inet addr add 10.3.0.2 peer 10.3.0.1 dev %%";
130+ };
131+}
132
133 # Ethernet example. Session 'lion'.
134 lion {
aa49757d 135diff -uNr vtun-2.5b1/vtund.conf.5 vtun-2.5b1-iproute/vtund.conf.5
136--- vtun-2.5b1/vtund.conf.5 Mon Jun 11 00:48:38 2001
137+++ vtun-2.5b1-iproute/vtund.conf.5 Tue Aug 21 01:17:08 2001
138@@ -70,6 +70,9 @@
139 .IP \fBroute\ \fIpath\fR
140 path to \fBroute\fR(8) program. Can be used in session sections.
141
142+.IP \fBip\ \fIpath\fR
143+path to \fBiproute\fR(8) program. Can be used in session sections.
144+
145 .IP \fBfirewall\ \fIpath\fR
146 program for the firewall setup.
147
148@@ -228,6 +231,8 @@
149 run program specified by \fBifconfig\fR statement in \fBoptions\fR section.
150 .IP \fBroute\ \fIarguments\fR
151 run program specified by \fBroute\fR statement in \fBoptions\fR section.
152+.IP \fBip\ \fIarguments\fR
153+run program specified by \fBip\fR statement in \fBoptions\fR section.
154 .IP \fBfirewall\ \fIarguments\fR
155 run program specified by \fBfirewall\fR statement in \fBoptions\fR section.
156 .RE
This page took 0.085969 seconds and 4 git commands to generate.