1 diff -ruN rp-l2tp-0.4-orig/Makefile.in rp-l2tp-0.4-4/Makefile.in
2 --- rp-l2tp-0.4-orig/Makefile.in 2004-07-01 17:17:11.000000000 +0200
3 +++ rp-l2tp-0.4-4/Makefile.in 2005-03-09 16:26:49.000000000 +0100
7 OBJS=auth.o debug.o dgram.o main.o md5.o network.o options.o peer.o session.o tunnel.o utils.o
8 -EXTRA_LIBS=@LIBEVENT@/*.o -ldl
9 +EXTRA_LIBS=@LIBEVENT@/*.o -lc -ldl
12 -CFLAGS=-g -I.. -I@LIBEVENT@ -Wall -Wstrict-prototypes -ansi -pedantic -D_GNU_SOURCE -DVERSION=\"$(VERSION)\" -DPREFIX=\"$(prefix)\"
13 +CFLAGS=@CFLAGS@ -I@LIBEVENT@ -Wall -Wstrict-prototypes -ansi -pedantic -D_GNU_SOURCE -DVERSION=\"$(VERSION)\" -DPREFIX=\"$(prefix)\"
15 TARGETS=l2tpd libl2tp.a handlers
26 l2tpd: libl2tp.a libevent/libevent.a
28 - @CC@ -o l2tpd -rdynamic $(OBJS) $(EXTRA_LIBS)
29 + @CC@ $(CFLAGS) -o l2tpd -rdynamic $(OBJS) $(EXTRA_LIBS)
32 test -d libevent || ln -s ../libevent .
36 $(MAKE) -C handlers clean
37 + $(MAKE) -C libevent clean
40 - rm -f Makefile config.cache
41 + rm -f Makefile config.cache config.log config.status .depend
42 $(MAKE) -C handlers distclean
43 + $(MAKE) -C libevent distclean
48 -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir)
49 - $(install) -m 755 -s l2tpd $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir)
50 + $(install) -m 755 l2tpd $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir)
51 -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/l2tp
52 - $(install) -m 644 l2tp.conf $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/l2tp/l2tp.conf.example
53 + $(install) -m 644 l2tp.conf $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/l2tp.conf.example
54 -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man8
55 -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man5
56 $(install) -m 644 man/l2tpd.8 $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man8
57 diff -ruN rp-l2tp-0.4-orig/handlers/Makefile.in rp-l2tp-0.4-4/handlers/Makefile.in
58 --- rp-l2tp-0.4-orig/handlers/Makefile.in 2002-09-30 21:45:00.000000000 +0200
59 +++ rp-l2tp-0.4-4/handlers/Makefile.in 2005-03-09 16:26:49.000000000 +0100
62 OBJS=pty.o sync-pppd.o dstring.o
64 -CFLAGS=-g -O2 -I.. -I../libevent -I../../libevent -Wall
65 +CFLAGS=@CFLAGS@ -I.. -I../libevent -I../../libevent -Wall
67 all: $(HANDLERS) l2tp-control
69 l2tp-control: cmd-control.o
70 - gcc -o l2tp-control cmd-control.o
71 + $(CC) $(CFLAGS) -o l2tp-control cmd-control.o
73 cmd-control.o: cmd-control.c
75 + $(CC) $(CFLAGS) -c -o $@ $^
78 - gcc $(CFLAGS) -fPIC -c -o $@ $<
79 + $(CC) $(CFLAGS) -fPIC -c -o $@ $<
81 sync-pppd.so: pty.o sync-pppd.o
82 - gcc -shared -o $@ $^
83 + $(CC) $(CFLAGS) -shared -o $@ $^
85 cmd.so: cmd.o dstring.o
86 - gcc -shared -o $@ $^
87 + $(CC) $(CFLAGS) -shared -o $@ $^
94 - -mkdir -p $(RPM_INSTALL_ROOT)$(sbindir)
95 - -mkdir -p $(RPM_INSTALL_ROOT)$(prefix)/lib/l2tp/plugins
96 - $(install) -m 755 -s l2tp-control $(RPM_INSTALL_ROOT)$(sbindir)
97 - $(install) -m 755 $(HANDLERS) $(RPM_INSTALL_ROOT)$(prefix)/lib/l2tp/plugins
98 + -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir)
99 + -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)$(prefix)/lib/l2tp
100 + $(install) -m 755 l2tp-control $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir)
101 + $(install) -m 755 $(HANDLERS) $(RPM_INSTALL_ROOT)$(DESTDIR)$(prefix)/lib/l2tp
105 diff -ruN rp-l2tp-0.4-orig/handlers/cmd-control.c rp-l2tp-0.4-4/handlers/cmd-control.c
106 --- rp-l2tp-0.4-orig/handlers/cmd-control.c 2002-09-30 21:45:00.000000000 +0200
107 +++ rp-l2tp-0.4-4/handlers/cmd-control.c 2005-03-09 16:26:49.000000000 +0100
110 memset(&addr, 0, sizeof(addr));
111 addr.sun_family = AF_LOCAL;
112 - strncpy(addr.sun_path, "/var/run/l2tpctrl", sizeof(addr.sun_path) - 1);
113 + strncpy(addr.sun_path, "/var/run/l2tp.sock", sizeof(addr.sun_path) - 1);
115 fd = socket(AF_LOCAL, SOCK_STREAM, 0);
117 diff -ruN rp-l2tp-0.4-orig/handlers/cmd.c rp-l2tp-0.4-4/handlers/cmd.c
118 --- rp-l2tp-0.4-orig/handlers/cmd.c 2004-07-01 16:58:56.000000000 +0200
119 +++ rp-l2tp-0.4-4/handlers/cmd.c 2005-03-09 16:26:49.000000000 +0100
122 /* We have hit the end of our options. Open command socket */
124 - sockname = "/var/run/l2tpctrl";
125 + sockname = "/var/run/l2tp.sock";
128 (void) remove(sockname);
129 diff -ruN rp-l2tp-0.4-orig/libevent/Makefile.in rp-l2tp-0.4-4/libevent/Makefile.in
130 --- rp-l2tp-0.4-orig/libevent/Makefile.in 2002-09-30 21:45:00.000000000 +0200
131 +++ rp-l2tp-0.4-4/libevent/Makefile.in 2005-03-09 16:26:49.000000000 +0100
136 - ar -cq libevent.a $(OBJS)
137 + $(AR) r libevent.a $(OBJS)
140 event.o: event.c $(HDRS)
141 - gcc $(CFLAGS) -c -o event.o event.c
142 + $(CC) $(CFLAGS) -c -o event.o event.c
144 hash.o: hash.c $(HDRS)
145 - gcc $(CFLAGS) -c -o hash.o hash.c
146 + $(CC) $(CFLAGS) -c -o hash.o hash.c
148 event_sig.o: event_sig.c $(HDRS)
149 - gcc $(CFLAGS) -c -o event_sig.o event_sig.c
150 + $(CC) $(CFLAGS) -c -o event_sig.o event_sig.c
152 event_tcp.o: event_tcp.c $(HDRS)
153 - gcc $(CFLAGS) -c -o event_tcp.o event_tcp.c
154 + $(CC) $(CFLAGS) -c -o event_tcp.o event_tcp.c
165 \ No newline at end of file
167 diff -ruN rp-l2tp-0.4-orig/main.c rp-l2tp-0.4-4/main.c
168 --- rp-l2tp-0.4-orig/main.c 2002-09-30 21:45:00.000000000 +0200
169 +++ rp-l2tp-0.4-4/main.c 2005-03-09 16:26:49.000000000 +0100
172 l2tp_debug_set_bitmask(debugmask);
174 - if (l2tp_parse_config_file(es, "/etc/l2tp/l2tp.conf") < 0) {
175 + if (l2tp_parse_config_file(es, "/etc/l2tp.conf") < 0) {
179 diff -ruN rp-l2tp-0.4-orig/man/l2tp.conf.5 rp-l2tp-0.4-4/man/l2tp.conf.5
180 --- rp-l2tp-0.4-orig/man/l2tp.conf.5 2004-07-01 16:58:56.000000000 +0200
181 +++ rp-l2tp-0.4-4/man/l2tp.conf.5 2005-03-09 16:26:49.000000000 +0100
183 in the global section. The only option available is:
184 .IP "\fBsocket-path\fP \fIpathname\fR"
185 Specifies the path name of the UNIX-domain socket for controlling the
186 -daemon. Defaults to \fI/var/run/l2tpctrl\fR.
187 +daemon. Defaults to \fI/var/run/l2tp.sock\fR.
189 Even if you do not supply any options to cmd, you \fImust\fR have
190 a \fBsection cmd\fR line to activate the handler.
191 diff -ruN rp-l2tp-0.4-orig/man/l2tpd.8 rp-l2tp-0.4-4/man/l2tpd.8
192 --- rp-l2tp-0.4-orig/man/l2tpd.8 2002-09-30 21:45:00.000000000 +0200
193 +++ rp-l2tp-0.4-4/man/l2tpd.8 2005-03-09 16:26:49.000000000 +0100
195 fairly lightweight and efficient.
197 .SH L2TPD CONFIGURATION
198 -On startup, \fBl2tpd\fR reads the configuration file \fB/etc/l2tp/l2tp.conf\fR.
199 +On startup, \fBl2tpd\fR reads the configuration file \fB/etc/l2tp.conf\fR.
200 This configuration file sets operating parameters, describes peers and loads
201 and configures handlers. See \fBl2tp.conf\fR(5) for configuration
206 -.B /etc/l2tp/l2tp.conf
208 Main configuration file.
210 -.B /var/run/l2tpctrl
211 +.B /var/run/l2tp.sock
212 Control socket for \fBcmd.so\fR handler.
215 diff -ruN rp-l2tp-0.4-orig/utils.c rp-l2tp-0.4-4/utils.c
216 --- rp-l2tp-0.4-orig/utils.c 2002-09-30 21:45:00.000000000 +0200
217 +++ rp-l2tp-0.4-4/utils.c 2005-03-09 16:26:49.000000000 +0100
219 * -1 on error, 0 if OK
221 * Dynamically-loads a handler and initializes it. If fname is not
222 -* an absolute path name, we load the handler from /usr/lib/l2tp/plugins
223 +* an absolute path name, we load the handler from /usr/lib/l2tp
224 ***********************************************************************/
226 l2tp_load_handler(EventSelector *es,
229 handle = dlopen(fname, RTLD_NOW);
231 - snprintf(buf, sizeof(buf), "%s/lib/l2tp/plugins/%s", PREFIX, fname);
232 + snprintf(buf, sizeof(buf), "%s/lib/l2tp/%s", PREFIX, fname);
233 buf[sizeof(buf)-1] = 0;
234 handle = dlopen(buf, RTLD_NOW);