1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
Patches from upstream CVS for bug IDs 1103-1106.
diff -Nru ppp-2.4.3.orig/pppd/auth.c ppp-2.4.3/pppd/auth.c
--- ppp-2.4.3.orig/pppd/auth.c 2004-11-12 12:30:51.000000000 +0200
+++ ppp-2.4.3/pppd/auth.c 2005-01-09 15:42:42.938985272 +0200
@@ -532,9 +532,12 @@
link_required(unit)
int unit;
{
+ char *msg;
+
new_phase(PHASE_SERIALCONN);
devfd = the_channel->connect();
+ msg = "Connect script failed";
if (devfd < 0)
goto fail;
@@ -547,6 +550,7 @@
* gives us. Thus we don't need the tdb_writelock/tdb_writeunlock.
*/
fd_ppp = the_channel->establish_ppp(devfd);
+ msg = "ppp establishment failed";
if (fd_ppp < 0) {
status = EXIT_FATAL_ERROR;
goto disconnect;
@@ -581,6 +585,8 @@
if (the_channel->cleanup)
(*the_channel->cleanup)();
+ /* XXX not nice here but needs to go somewhere... */
+ lcp_close(0, msg);
}
/*
diff -Nru ppp-2.4.3.orig/pppd/options.c ppp-2.4.3/pppd/options.c
--- ppp-2.4.3.orig/pppd/options.c 2005-01-09 15:41:20.733482408 +0200
+++ ppp-2.4.3/pppd/options.c 2005-01-09 15:43:57.593636040 +0200
@@ -58,12 +58,12 @@
#ifdef PPP_FILTER
#include <pcap.h>
/*
- * DLT_PPP_WITH_DIRECTION is in current libpcap cvs, and should be in
+ * DLT_PPP_WITHDIRECTION is in current libpcap cvs, and should be in
* libpcap-0.8.4. Until that is released, use DLT_PPP - but that means
* we lose the inbound and outbound qualifiers.
*/
-#ifndef DLT_PPP_WITH_DIRECTION
-#define DLT_PPP_WITH_DIRECTION DLT_PPP
+#ifndef DLT_PPP_WITHDIRECTION
+#define DLT_PPP_WITHDIRECTION DLT_PPP
#endif
#endif
@@ -1455,13 +1455,13 @@
char **argv;
{
pcap_t *pc;
- int ret = 0;
+ int ret = 1;
- pc = pcap_open_dead(DLT_PPP_WITH_DIRECTION, 65535);
+ pc = pcap_open_dead(DLT_PPP_WITHDIRECTION, 65535);
if (pcap_compile(pc, &pass_filter, *argv, 1, netmask) == -1) {
option_error("error in pass-filter expression: %s\n",
pcap_geterr(pc));
- ret = 1;
+ ret = 0;
}
pcap_close(pc);
@@ -1476,13 +1476,13 @@
char **argv;
{
pcap_t *pc;
- int ret = 0;
+ int ret = 1;
- pc = pcap_open_dead(DLT_PPP_WITH_DIRECTION, 65535);
+ pc = pcap_open_dead(DLT_PPP_WITHDIRECTION, 65535);
if (pcap_compile(pc, &active_filter, *argv, 1, netmask) == -1) {
option_error("error in active-filter expression: %s\n",
pcap_geterr(pc));
- ret = 1;
+ ret = 0;
}
pcap_close(pc);
diff -Nru ppp-2.4.3.orig/pppd/tty.c ppp-2.4.3/pppd/tty.c
--- ppp-2.4.3.orig/pppd/tty.c 2004-11-13 14:07:29.000000000 +0200
+++ ppp-2.4.3/pppd/tty.c 2005-01-09 15:42:42.937985424 +0200
@@ -755,14 +755,6 @@
close(pty_master);
pty_master = -1;
}
- if (pty_slave >= 0) {
- close(pty_slave);
- pty_slave = -1;
- }
- if (real_ttyfd >= 0) {
- close(real_ttyfd);
- real_ttyfd = -1;
- }
ttyfd = -1;
if (got_sigterm)
asked_to_quit = 1;
|