summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDongxiao Xu <dongxiao.xu@intel.com>2010-07-01 14:34:12 +0800
committerRichard Purdie <rpurdie@linux.intel.com>2010-07-02 15:28:54 +0100
commit057d63096253b61551dbc2d0ea34a60f58987969 (patch)
tree5b860616fa619ca40b6702c715090a9b47b74edf
parent4cf75289108579ac2048178465c98e8c36f39038 (diff)
downloadpoky-057d63096253b61551dbc2d0ea34a60f58987969.tar.gz
ppp: Upgraded to version 2.4.5
Removed some patches since they are already in latest package Rebased some patches to fit ppp-2.4.5 Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
-rw-r--r--meta/packages/ppp/ppp-2.4.3/makefile-remove-hard-usr-reference.patch19
-rw-r--r--meta/packages/ppp/ppp-2.4.3/plugins-fix-CC.patch7
-rw-r--r--meta/packages/ppp/ppp-2.4.3/pppoatm-makefile.patch7
-rw-r--r--meta/packages/ppp/ppp-2.4.5/08setupdns (renamed from meta/packages/ppp/files/08setupdns)0
-rw-r--r--meta/packages/ppp/ppp-2.4.5/92removedns (renamed from meta/packages/ppp/files/92removedns)0
-rw-r--r--meta/packages/ppp/ppp-2.4.5/cifdefroute.patch (renamed from meta/packages/ppp/ppp-2.4.3/cifdefroute.patch)124
-rw-r--r--meta/packages/ppp/ppp-2.4.5/enable-ipv6.patch (renamed from meta/packages/ppp/ppp-2.4.3/enable-ipv6.patch)2
-rwxr-xr-xmeta/packages/ppp/ppp-2.4.5/init (renamed from meta/packages/ppp/files/init)0
-rwxr-xr-xmeta/packages/ppp/ppp-2.4.5/ip-down (renamed from meta/packages/ppp/files/ip-down)0
-rwxr-xr-xmeta/packages/ppp/ppp-2.4.5/ip-up (renamed from meta/packages/ppp/files/ip-up)0
-rw-r--r--meta/packages/ppp/ppp-2.4.5/makefile-remove-hard-usr-reference.patch19
-rw-r--r--meta/packages/ppp/ppp-2.4.5/makefile.patch (renamed from meta/packages/ppp/ppp-2.4.3/makefile.patch)96
-rw-r--r--meta/packages/ppp/ppp-2.4.5/poff (renamed from meta/packages/ppp/files/poff)0
-rw-r--r--meta/packages/ppp/ppp-2.4.5/pon (renamed from meta/packages/ppp/files/pon)0
-rw-r--r--meta/packages/ppp/ppp-2.4.5/pppd-resolv-varrun.patch (renamed from meta/packages/ppp/ppp-2.4.3/pppd-resolv-varrun.patch)20
-rw-r--r--meta/packages/ppp/ppp_2.4.5.bb (renamed from meta/packages/ppp/ppp_2.4.3.bb)40
16 files changed, 167 insertions, 167 deletions
diff --git a/meta/packages/ppp/ppp-2.4.3/makefile-remove-hard-usr-reference.patch b/meta/packages/ppp/ppp-2.4.3/makefile-remove-hard-usr-reference.patch
deleted file mode 100644
index 574abfaf2c..0000000000
--- a/meta/packages/ppp/ppp-2.4.3/makefile-remove-hard-usr-reference.patch
+++ /dev/null
@@ -1,19 +0,0 @@
1--- ppp-2.4.3/pppd/Makefile.linux.orig 2006-01-17 15:09:56.000000000 +0000
2+++ ppp-2.4.3/pppd/Makefile.linux 2006-01-17 15:10:21.000000000 +0000
3@@ -117,12 +117,12 @@
4 #LIBS += -lshadow $(LIBS)
5 endif
6
7-ifneq ($(wildcard /usr/include/crypt.h),)
8+#ifneq ($(wildcard /usr/include/crypt.h),)
9 CFLAGS += -DHAVE_CRYPT_H=1
10-endif
11-ifneq ($(wildcard /usr/lib/libcrypt.*),)
12+#endif
13+#ifneq ($(wildcard /usr/lib/libcrypt.*),)
14 LIBS += -lcrypt
15-endif
16+#endif
17
18 ifdef NEEDDES
19 ifndef USE_CRYPT
diff --git a/meta/packages/ppp/ppp-2.4.3/plugins-fix-CC.patch b/meta/packages/ppp/ppp-2.4.3/plugins-fix-CC.patch
deleted file mode 100644
index ac3822ac1d..0000000000
--- a/meta/packages/ppp/ppp-2.4.3/plugins-fix-CC.patch
+++ /dev/null
@@ -1,7 +0,0 @@
1--- ppp-2.4.3/pppd/plugins/Makefile.linux~ 2004-11-13 23:57:35.000000000 -0800
2+++ ppp-2.4.3/pppd/plugins/Makefile.linux 2005-08-11 17:19:28.000000000 -0700
3@@ -1,4 +1,3 @@
4-CC = gcc
5 COPTS = -O2 -g
6 CFLAGS = $(COPTS) -I.. -I../../include -fPIC
7 LDFLAGS = -shared
diff --git a/meta/packages/ppp/ppp-2.4.3/pppoatm-makefile.patch b/meta/packages/ppp/ppp-2.4.3/pppoatm-makefile.patch
deleted file mode 100644
index 5601f593d0..0000000000
--- a/meta/packages/ppp/ppp-2.4.3/pppoatm-makefile.patch
+++ /dev/null
@@ -1,7 +0,0 @@
1--- ppp-2.4.3/pppd/plugins/pppoatm/Makefile.linux.orig 2005-10-26 20:38:50.990298750 +0100
2+++ ppp-2.4.3/pppd/plugins/pppoatm/Makefile.linux 2005-10-26 20:39:05.583210750 +0100
3@@ -1,4 +1,3 @@
4-CC = gcc
5 COPTS = -O2 -g
6 CFLAGS = $(COPTS) -I../.. -I../../../include -fPIC
7 LDFLAGS = -shared
diff --git a/meta/packages/ppp/files/08setupdns b/meta/packages/ppp/ppp-2.4.5/08setupdns
index 998219de97..998219de97 100644
--- a/meta/packages/ppp/files/08setupdns
+++ b/meta/packages/ppp/ppp-2.4.5/08setupdns
diff --git a/meta/packages/ppp/files/92removedns b/meta/packages/ppp/ppp-2.4.5/92removedns
index 2eadec6899..2eadec6899 100644
--- a/meta/packages/ppp/files/92removedns
+++ b/meta/packages/ppp/ppp-2.4.5/92removedns
diff --git a/meta/packages/ppp/ppp-2.4.3/cifdefroute.patch b/meta/packages/ppp/ppp-2.4.5/cifdefroute.patch
index d61b920c50..6473a08bc7 100644
--- a/meta/packages/ppp/ppp-2.4.3/cifdefroute.patch
+++ b/meta/packages/ppp/ppp-2.4.5/cifdefroute.patch
@@ -1,37 +1,37 @@
1This patch comes from OpenEmbedded.
2The original patch is from Debian / SuSE to implement replacedefaultroute
3Rebased it to fit ppp-2.4.5. Dongxiao Xu <dongxiao.xu@intel.com>
1 4
2# 5diff -urN ppp-2.4.5-orig/pppd/ipcp.c ppp-2.4.5/pppd/ipcp.c
3# Patch managed by http://www.holgerschurig.de/patcher.html 6--- ppp-2.4.5-orig/pppd/ipcp.c 2010-06-30 15:51:12.050166398 +0800
4# 7+++ ppp-2.4.5/pppd/ipcp.c 2010-06-30 16:40:00.478716855 +0800
5 8@@ -198,6 +198,16 @@
6--- ppp-2.4.3/pppd/ipcp.c~cifdefroute.patch
7+++ ppp-2.4.3/pppd/ipcp.c
8@@ -197,6 +197,16 @@
9 "disable defaultroute option", OPT_ALIAS | OPT_A2CLR, 9 "disable defaultroute option", OPT_ALIAS | OPT_A2CLR,
10 &ipcp_wantoptions[0].default_route }, 10 &ipcp_wantoptions[0].default_route },
11 11
12+#ifdef __linux__ 12+#ifdef __linux__
13+ { "replacedefaultroute", o_bool, 13+ { "replacedefaultroute", o_bool,
14+ &ipcp_wantoptions[0].replace_default_route, 14+ &ipcp_wantoptions[0].replace_default_route,
15+ "Replace default route", 1 15+ "Replace default route", 1
16+ }, 16+ },
17+ { "noreplacedefaultroute", o_bool, 17+ { "noreplacedefaultroute", o_bool,
18+ &ipcp_allowoptions[0].replace_default_route, 18+ &ipcp_allowoptions[0].replace_default_route,
19+ "Never replace default route", OPT_A2COPY, 19+ "Never replace default route", OPT_A2COPY,
20+ &ipcp_wantoptions[0].replace_default_route }, 20+ &ipcp_wantoptions[0].replace_default_route },
21+#endif 21+#endif
22 { "proxyarp", o_bool, &ipcp_wantoptions[0].proxy_arp, 22 { "proxyarp", o_bool, &ipcp_wantoptions[0].proxy_arp,
23 "Add proxy ARP entry", OPT_ENABLE|1, &ipcp_allowoptions[0].proxy_arp }, 23 "Add proxy ARP entry", OPT_ENABLE|1, &ipcp_allowoptions[0].proxy_arp },
24 { "noproxyarp", o_bool, &ipcp_allowoptions[0].proxy_arp, 24 { "noproxyarp", o_bool, &ipcp_allowoptions[0].proxy_arp,
25@@ -263,7 +273,7 @@ 25@@ -271,7 +281,7 @@
26 ip_active_pkt 26 ip_active_pkt
27 }; 27 };
28 28
29-static void ipcp_clear_addrs __P((int, u_int32_t, u_int32_t)); 29-static void ipcp_clear_addrs __P((int, u_int32_t, u_int32_t));
30+static void ipcp_clear_addrs __P((int, u_int32_t, u_int32_t, bool)); 30+static void ipcp_clear_addrs __P((int, u_int32_t, u_int32_t, bool));
31 static void ipcp_script __P((char *)); /* Run an up/down script */ 31 static void ipcp_script __P((char *, int)); /* Run an up/down script */
32 static void ipcp_script_done __P((void *)); 32 static void ipcp_script_done __P((void *));
33 33
34@@ -1659,7 +1669,12 @@ 34@@ -1742,7 +1752,12 @@
35 if (!sifnpmode(u, PPP_IP, NPMODE_QUEUE)) 35 if (!sifnpmode(u, PPP_IP, NPMODE_QUEUE))
36 return 0; 36 return 0;
37 if (wo->default_route) 37 if (wo->default_route)
@@ -39,22 +39,22 @@
39 if (sifdefaultroute(u, wo->ouraddr, wo->hisaddr)) 39 if (sifdefaultroute(u, wo->ouraddr, wo->hisaddr))
40+#else 40+#else
41+ if (sifdefaultroute(u, wo->ouraddr, wo->hisaddr, 41+ if (sifdefaultroute(u, wo->ouraddr, wo->hisaddr,
42+ wo->replace_default_route)) 42+ wo->replace_default_route))
43+#endif 43+#endif
44 default_route_set[u] = 1; 44 default_route_set[u] = 1;
45 if (wo->proxy_arp) 45 if (wo->proxy_arp)
46 if (sifproxyarp(u, wo->hisaddr)) 46 if (sifproxyarp(u, wo->hisaddr))
47@@ -1741,7 +1756,8 @@ 47@@ -1830,7 +1845,8 @@
48 */ 48 */
49 if (demand) { 49 if (demand) {
50 if (go->ouraddr != wo->ouraddr || ho->hisaddr != wo->hisaddr) { 50 if (go->ouraddr != wo->ouraddr || ho->hisaddr != wo->hisaddr) {
51- ipcp_clear_addrs(f->unit, wo->ouraddr, wo->hisaddr); 51- ipcp_clear_addrs(f->unit, wo->ouraddr, wo->hisaddr);
52+ ipcp_clear_addrs(f->unit, wo->ouraddr, wo->hisaddr, 52+ ipcp_clear_addrs(f->unit, wo->ouraddr, wo->hisaddr,
53+ wo->replace_default_route); 53+ wo->replace_default_route);
54 if (go->ouraddr != wo->ouraddr) { 54 if (go->ouraddr != wo->ouraddr) {
55 warn("Local IP address changed to %I", go->ouraddr); 55 warn("Local IP address changed to %I", go->ouraddr);
56 script_setenv("OLDIPLOCAL", ip_ntoa(wo->ouraddr), 0); 56 script_setenv("OLDIPLOCAL", ip_ntoa(wo->ouraddr), 0);
57@@ -1766,7 +1782,12 @@ 57@@ -1855,7 +1871,12 @@
58 58
59 /* assign a default route through the interface if required */ 59 /* assign a default route through the interface if required */
60 if (ipcp_wantoptions[f->unit].default_route) 60 if (ipcp_wantoptions[f->unit].default_route)
@@ -67,7 +67,7 @@
67 default_route_set[f->unit] = 1; 67 default_route_set[f->unit] = 1;
68 68
69 /* Make a proxy ARP entry if requested. */ 69 /* Make a proxy ARP entry if requested. */
70@@ -1813,7 +1834,12 @@ 70@@ -1905,7 +1926,12 @@
71 71
72 /* assign a default route through the interface if required */ 72 /* assign a default route through the interface if required */
73 if (ipcp_wantoptions[f->unit].default_route) 73 if (ipcp_wantoptions[f->unit].default_route)
@@ -80,7 +80,7 @@
80 default_route_set[f->unit] = 1; 80 default_route_set[f->unit] = 1;
81 81
82 /* Make a proxy ARP entry if requested. */ 82 /* Make a proxy ARP entry if requested. */
83@@ -1890,7 +1916,7 @@ 83@@ -1983,7 +2009,7 @@
84 sifnpmode(f->unit, PPP_IP, NPMODE_DROP); 84 sifnpmode(f->unit, PPP_IP, NPMODE_DROP);
85 sifdown(f->unit); 85 sifdown(f->unit);
86 ipcp_clear_addrs(f->unit, ipcp_gotoptions[f->unit].ouraddr, 86 ipcp_clear_addrs(f->unit, ipcp_gotoptions[f->unit].ouraddr,
@@ -89,7 +89,7 @@
89 } 89 }
90 90
91 /* Execute the ip-down script */ 91 /* Execute the ip-down script */
92@@ -1906,16 +1932,25 @@ 92@@ -1999,12 +2025,21 @@
93 * proxy arp entries, etc. 93 * proxy arp entries, etc.
94 */ 94 */
95 static void 95 static void
@@ -100,11 +100,7 @@
100 u_int32_t hisaddr; /* remote address */ 100 u_int32_t hisaddr; /* remote address */
101+ bool replacedefaultroute; 101+ bool replacedefaultroute;
102 { 102 {
103 if (proxy_arp_set[unit]) { 103- if (proxy_arp_set[unit]) {
104 cifproxyarp(unit, hisaddr);
105 proxy_arp_set[unit] = 0;
106 }
107- if (default_route_set[unit]) {
108+ /* If replacedefaultroute, sifdefaultroute will be called soon 104+ /* If replacedefaultroute, sifdefaultroute will be called soon
109+ * with replacedefaultroute set and that will overwrite the current 105+ * with replacedefaultroute set and that will overwrite the current
110+ * default route. This is the case only when doing demand, otherwise 106+ * default route. This is the case only when doing demand, otherwise
@@ -114,22 +110,24 @@
114+ * is one saved by an sifdefaultroute with replacedefaultroute. 110+ * is one saved by an sifdefaultroute with replacedefaultroute.
115+ */ 111+ */
116+ if (!replacedefaultroute && default_route_set[unit]) { 112+ if (!replacedefaultroute && default_route_set[unit]) {
117 cifdefaultroute(unit, ouraddr, hisaddr); 113 cifproxyarp(unit, hisaddr);
118 default_route_set[unit] = 0; 114 proxy_arp_set[unit] = 0;
119 } 115 }
120--- ppp-2.4.3/pppd/ipcp.h~cifdefroute.patch 116diff -urN ppp-2.4.5-orig/pppd/ipcp.h ppp-2.4.5/pppd/ipcp.h
121+++ ppp-2.4.3/pppd/ipcp.h 117--- ppp-2.4.5-orig/pppd/ipcp.h 2010-06-30 15:51:12.043682063 +0800
118+++ ppp-2.4.5/pppd/ipcp.h 2010-06-30 16:40:49.586203129 +0800
122@@ -70,6 +70,7 @@ 119@@ -70,6 +70,7 @@
123 bool old_addrs; /* Use old (IP-Addresses) option? */ 120 bool old_addrs; /* Use old (IP-Addresses) option? */
124 bool req_addr; /* Ask peer to send IP address? */ 121 bool req_addr; /* Ask peer to send IP address? */
125 bool default_route; /* Assign default route through interface? */ 122 bool default_route; /* Assign default route through interface? */
126+ bool replace_default_route; /* Replace default route through interface? */ 123+ bool replace_default_route; /* Replace default route through interface? */
127 bool proxy_arp; /* Make proxy ARP entry for peer? */ 124 bool proxy_arp; /* Make proxy ARP entry for peer? */
128 bool neg_vj; /* Van Jacobson Compression? */ 125 bool neg_vj; /* Van Jacobson Compression? */
129 bool old_vj; /* use old (short) form of VJ option? */ 126 bool old_vj; /* use old (short) form of VJ option? */
130--- ppp-2.4.3/pppd/pppd.8~cifdefroute.patch 127diff -urN ppp-2.4.5-orig/pppd/pppd.8 ppp-2.4.5/pppd/pppd.8
131+++ ppp-2.4.3/pppd/pppd.8 128--- ppp-2.4.5-orig/pppd/pppd.8 2010-06-30 15:51:12.043682063 +0800
132@@ -120,6 +120,13 @@ 129+++ ppp-2.4.5/pppd/pppd.8 2010-06-30 16:42:47.102413859 +0800
130@@ -121,6 +121,13 @@
133 This entry is removed when the PPP connection is broken. This option 131 This entry is removed when the PPP connection is broken. This option
134 is privileged if the \fInodefaultroute\fR option has been specified. 132 is privileged if the \fInodefaultroute\fR option has been specified.
135 .TP 133 .TP
@@ -143,7 +141,7 @@
143 .B disconnect \fIscript 141 .B disconnect \fIscript
144 Execute the command specified by \fIscript\fR, by passing it to a 142 Execute the command specified by \fIscript\fR, by passing it to a
145 shell, after 143 shell, after
146@@ -701,7 +708,12 @@ 144@@ -717,7 +724,12 @@
147 .TP 145 .TP
148 .B nodefaultroute 146 .B nodefaultroute
149 Disable the \fIdefaultroute\fR option. The system administrator who 147 Disable the \fIdefaultroute\fR option. The system administrator who
@@ -157,9 +155,10 @@
157 can do so by placing this option in the /etc/ppp/options file. 155 can do so by placing this option in the /etc/ppp/options file.
158 .TP 156 .TP
159 .B nodeflate 157 .B nodeflate
160--- ppp-2.4.3/pppd/pppd.h~cifdefroute.patch 158diff -urN ppp-2.4.5-orig/pppd/pppd.h ppp-2.4.5/pppd/pppd.h
161+++ ppp-2.4.3/pppd/pppd.h 159--- ppp-2.4.5-orig/pppd/pppd.h 2010-06-30 15:51:12.050166398 +0800
162@@ -640,7 +640,11 @@ 160+++ ppp-2.4.5/pppd/pppd.h 2010-06-30 16:43:36.514148327 +0800
161@@ -643,7 +643,11 @@
163 int cif6addr __P((int, eui64_t, eui64_t)); 162 int cif6addr __P((int, eui64_t, eui64_t));
164 /* Remove an IPv6 address from i/f */ 163 /* Remove an IPv6 address from i/f */
165 #endif 164 #endif
@@ -171,18 +170,19 @@
171 /* Create default route through i/f */ 170 /* Create default route through i/f */
172 int cifdefaultroute __P((int, u_int32_t, u_int32_t)); 171 int cifdefaultroute __P((int, u_int32_t, u_int32_t));
173 /* Delete default route through i/f */ 172 /* Delete default route through i/f */
174--- ppp-2.4.3/pppd/sys-linux.c~cifdefroute.patch 173diff -urN ppp-2.4.5-orig/pppd/sys-linux.c ppp-2.4.5/pppd/sys-linux.c
175+++ ppp-2.4.3/pppd/sys-linux.c 174--- ppp-2.4.5-orig/pppd/sys-linux.c 2010-06-30 15:51:12.050166398 +0800
175+++ ppp-2.4.5/pppd/sys-linux.c 2010-06-30 16:54:00.362716231 +0800
176@@ -206,6 +206,8 @@ 176@@ -206,6 +206,8 @@
177 177
178 static int if_is_up; /* Interface has been marked up */ 178 static int if_is_up; /* Interface has been marked up */
179 static u_int32_t default_route_gateway; /* Gateway for default route added */ 179 static int have_default_route; /* Gateway for default route added */
180+static struct rtentry old_def_rt; /* Old default route */ 180+static struct rtentry old_def_rt; /* Old default route */
181+static int default_rt_repl_rest; /* replace and restore old default rt */ 181+static int default_rt_repl_rest; /* replace and restore old default rt */
182 static u_int32_t proxy_arp_addr; /* Addr for proxy arp entry added */ 182 static u_int32_t proxy_arp_addr; /* Addr for proxy arp entry added */
183 static char proxy_arp_dev[16]; /* Device for proxy arp entry */ 183 static char proxy_arp_dev[16]; /* Device for proxy arp entry */
184 static u_int32_t our_old_addr; /* for detecting address changes */ 184 static u_int32_t our_old_addr; /* for detecting address changes */
185@@ -1513,6 +1515,9 @@ 185@@ -1537,6 +1539,9 @@
186 p = NULL; 186 p = NULL;
187 } 187 }
188 188
@@ -192,10 +192,24 @@
192 SIN_ADDR(rt->rt_dst) = strtoul(cols[route_dest_col], NULL, 16); 192 SIN_ADDR(rt->rt_dst) = strtoul(cols[route_dest_col], NULL, 16);
193 SIN_ADDR(rt->rt_gateway) = strtoul(cols[route_gw_col], NULL, 16); 193 SIN_ADDR(rt->rt_gateway) = strtoul(cols[route_gw_col], NULL, 16);
194 SIN_ADDR(rt->rt_genmask) = strtoul(cols[route_mask_col], NULL, 16); 194 SIN_ADDR(rt->rt_genmask) = strtoul(cols[route_mask_col], NULL, 16);
195@@ -1582,19 +1587,53 @@ 195@@ -1606,20 +1611,51 @@
196 /******************************************************************** 196 /********************************************************************
197 * 197 *
198 * sifdefaultroute - assign a default route through the address given. 198 * sifdefaultroute - assign a default route through the address given.
199- */
200-
201-int sifdefaultroute (int unit, u_int32_t ouraddr, u_int32_t gateway)
202-{
203- struct rtentry rt;
204-
205- if (defaultroute_exists(&rt) && strcmp(rt.rt_dev, ifname) != 0) {
206- if (rt.rt_flags & RTF_GATEWAY)
207- error("not replacing existing default route via %I",
208- SIN_ADDR(rt.rt_gateway));
209- else
210- error("not replacing existing default route through %s",
211- rt.rt_dev);
212- return 0;
199+ * 213+ *
200+ * If the global default_rt_repl_rest flag is set, then this function 214+ * If the global default_rt_repl_rest flag is set, then this function
201+ * already replaced the original system defaultroute with some other 215+ * already replaced the original system defaultroute with some other
@@ -204,18 +218,13 @@
204+ * when pppd sets first a defaultroute it it's temporary ppp0 addresses 218+ * when pppd sets first a defaultroute it it's temporary ppp0 addresses
205+ * and then changes the temporary addresses to the addresses for the real 219+ * and then changes the temporary addresses to the addresses for the real
206+ * ppp connection when it has come up. 220+ * ppp connection when it has come up.
207 */ 221+ */
208 222+
209-int sifdefaultroute (int unit, u_int32_t ouraddr, u_int32_t gateway)
210+int sifdefaultroute (int unit, u_int32_t ouraddr, u_int32_t gateway, bool replace) 223+int sifdefaultroute (int unit, u_int32_t ouraddr, u_int32_t gateway, bool replace)
211 { 224+{
212- struct rtentry rt;
213+ struct rtentry rt, tmp_rt; 225+ struct rtentry rt, tmp_rt;
214+ struct rtentry *del_rt = NULL; 226+ struct rtentry *del_rt = NULL;
215 227+
216- if (defaultroute_exists(&rt) && strcmp(rt.rt_dev, ifname) != 0) {
217- u_int32_t old_gateway = SIN_ADDR(rt.rt_gateway);
218+
219+ if (default_rt_repl_rest) { 228+ if (default_rt_repl_rest) {
220+ /* We have already reclaced the original defaultroute, if we 229+ /* We have already reclaced the original defaultroute, if we
221+ * are called again, we will delete the current default route 230+ * are called again, we will delete the current default route
@@ -229,11 +238,6 @@
229+ * check if we should save and replace a default route: 238+ * check if we should save and replace a default route:
230+ */ 239+ */
231+ u_int32_t old_gateway = SIN_ADDR(old_def_rt.rt_gateway); 240+ u_int32_t old_gateway = SIN_ADDR(old_def_rt.rt_gateway);
232
233- if (old_gateway != gateway)
234- error("not replacing existing default route to %s [%I]",
235- rt.rt_dev, old_gateway);
236- return 0;
237+ if (old_gateway != gateway) { 241+ if (old_gateway != gateway) {
238+ if (!replace) { 242+ if (!replace) {
239+ error("not replacing default route to %s [%I]", 243+ error("not replacing default route to %s [%I]",
@@ -253,8 +257,8 @@
253+ } 257+ }
254 } 258 }
255 259
256 memset (&rt, '\0', sizeof (rt)); 260 memset (&rt, 0, sizeof (rt));
257@@ -1616,6 +1655,12 @@ 261@@ -1638,6 +1674,12 @@
258 error("default route ioctl(SIOCADDRT): %m"); 262 error("default route ioctl(SIOCADDRT): %m");
259 return 0; 263 return 0;
260 } 264 }
@@ -265,9 +269,9 @@
265+ return 0; 269+ return 0;
266+ } 270+ }
267 271
268 default_route_gateway = gateway; 272 have_default_route = 1;
269 return 1; 273 return 1;
270@@ -1651,6 +1696,16 @@ 274@@ -1673,6 +1715,16 @@
271 return 0; 275 return 0;
272 } 276 }
273 } 277 }
diff --git a/meta/packages/ppp/ppp-2.4.3/enable-ipv6.patch b/meta/packages/ppp/ppp-2.4.5/enable-ipv6.patch
index 7b8acb2dd0..daa7f2ecc6 100644
--- a/meta/packages/ppp/ppp-2.4.3/enable-ipv6.patch
+++ b/meta/packages/ppp/ppp-2.4.5/enable-ipv6.patch
@@ -1,3 +1,5 @@
1The patch comes from OpenEmbedded
2
1--- ppp-2.4.3/pppd/Makefile.linux.orig 2005-10-28 21:07:40.396359250 +0100 3--- ppp-2.4.3/pppd/Makefile.linux.orig 2005-10-28 21:07:40.396359250 +0100
2+++ ppp-2.4.3/pppd/Makefile.linux 2005-10-28 21:07:54.217223000 +0100 4+++ ppp-2.4.3/pppd/Makefile.linux 2005-10-28 21:07:54.217223000 +0100
3@@ -62,7 +62,7 @@ 5@@ -62,7 +62,7 @@
diff --git a/meta/packages/ppp/files/init b/meta/packages/ppp/ppp-2.4.5/init
index 5b3b7abe2f..5b3b7abe2f 100755
--- a/meta/packages/ppp/files/init
+++ b/meta/packages/ppp/ppp-2.4.5/init
diff --git a/meta/packages/ppp/files/ip-down b/meta/packages/ppp/ppp-2.4.5/ip-down
index 06d35487a5..06d35487a5 100755
--- a/meta/packages/ppp/files/ip-down
+++ b/meta/packages/ppp/ppp-2.4.5/ip-down
diff --git a/meta/packages/ppp/files/ip-up b/meta/packages/ppp/ppp-2.4.5/ip-up
index fc2fae9fe0..fc2fae9fe0 100755
--- a/meta/packages/ppp/files/ip-up
+++ b/meta/packages/ppp/ppp-2.4.5/ip-up
diff --git a/meta/packages/ppp/ppp-2.4.5/makefile-remove-hard-usr-reference.patch b/meta/packages/ppp/ppp-2.4.5/makefile-remove-hard-usr-reference.patch
new file mode 100644
index 0000000000..9ba868839e
--- /dev/null
+++ b/meta/packages/ppp/ppp-2.4.5/makefile-remove-hard-usr-reference.patch
@@ -0,0 +1,19 @@
1The patch comes from OpenEmbedded.
2Rebased for ppp-2.4.5. Dongxiao Xu <dongxiao.xu@intel.com>
3
4diff -urN ppp-2.4.5-orig/pppd/Makefile.linux ppp-2.4.5/pppd/Makefile.linux
5--- ppp-2.4.5-orig/pppd/Makefile.linux 2010-06-30 15:51:12.043682063 +0800
6+++ ppp-2.4.5/pppd/Makefile.linux 2010-06-30 17:08:21.806363042 +0800
7@@ -117,10 +117,10 @@
8 #LIBS += -lshadow $(LIBS)
9 endif
10
11-ifneq ($(wildcard /usr/include/crypt.h),)
12+#ifneq ($(wildcard /usr/include/crypt.h),)
13 CFLAGS += -DHAVE_CRYPT_H=1
14 LIBS += -lcrypt
15-endif
16+#endif
17
18 ifdef NEEDDES
19 ifndef USE_CRYPT
diff --git a/meta/packages/ppp/ppp-2.4.3/makefile.patch b/meta/packages/ppp/ppp-2.4.5/makefile.patch
index 4b9cf30cdd..94af5af6de 100644
--- a/meta/packages/ppp/ppp-2.4.3/makefile.patch
+++ b/meta/packages/ppp/ppp-2.4.5/makefile.patch
@@ -1,21 +1,21 @@
1The patch comes from OpenEmbedded
2Rebased for ppp-2.4.5. Dongxiao Xu <dongxiao.xu@intel.com>
1 3
2# 4diff -ruN ppp-2.4.5-orig/chat/Makefile.linux ppp-2.4.5/chat/Makefile.linux
3# Patch managed by http://www.holgerschurig.de/patcher.html 5--- ppp-2.4.5-orig/chat/Makefile.linux 2010-06-30 15:51:12.050166398 +0800
4# 6+++ ppp-2.4.5/chat/Makefile.linux 2010-06-30 15:51:30.450118446 +0800
5
6--- ppp-2.4.3/chat/Makefile.linux~pppd.patch
7+++ ppp-2.4.3/chat/Makefile.linux
8@@ -25,7 +25,7 @@ 7@@ -25,7 +25,7 @@
9 8
10 install: chat 9 install: chat
11 mkdir -p $(BINDIR) 10 mkdir -p $(BINDIR) $(MANDIR)
12- $(INSTALL) -s -c chat $(BINDIR) 11- $(INSTALL) -s -c chat $(BINDIR)
13+ $(INSTALL) -c chat $(BINDIR) 12+ $(INSTALL) -c chat $(BINDIR)
14 $(INSTALL) -c -m 644 chat.8 $(MANDIR) 13 $(INSTALL) -c -m 644 chat.8 $(MANDIR)
15 14
16 clean: 15 clean:
17--- ppp-2.4.3/pppd/Makefile.linux~pppd.patch 16diff -ruN ppp-2.4.5-orig/pppd/Makefile.linux ppp-2.4.5/pppd/Makefile.linux
18+++ ppp-2.4.3/pppd/Makefile.linux 17--- ppp-2.4.5-orig/pppd/Makefile.linux 2010-06-30 15:51:12.043682063 +0800
18+++ ppp-2.4.5/pppd/Makefile.linux 2010-06-30 15:52:11.214170607 +0800
19@@ -99,7 +99,7 @@ 19@@ -99,7 +99,7 @@
20 CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include 20 CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
21 LIBS += -lsrp -L/usr/local/ssl/lib -lcrypto 21 LIBS += -lsrp -L/usr/local/ssl/lib -lcrypto
@@ -25,7 +25,7 @@
25 MANPAGES += srp-entry.8 25 MANPAGES += srp-entry.8
26 EXTRACLEAN += srp-entry.o 26 EXTRACLEAN += srp-entry.o
27 NEEDDES=y 27 NEEDDES=y
28@@ -202,7 +202,7 @@ 28@@ -200,7 +200,7 @@
29 install: pppd 29 install: pppd
30 mkdir -p $(BINDIR) $(MANDIR) 30 mkdir -p $(BINDIR) $(MANDIR)
31 $(EXTRAINSTALL) 31 $(EXTRAINSTALL)
@@ -34,42 +34,9 @@
34 if chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \ 34 if chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \
35 chmod o-rx,u+s $(BINDIR)/pppd; fi 35 chmod o-rx,u+s $(BINDIR)/pppd; fi
36 $(INSTALL) -c -m 444 pppd.8 $(MANDIR) 36 $(INSTALL) -c -m 444 pppd.8 $(MANDIR)
37--- ppp-2.4.3/pppdump/Makefile.linux~pppd.patch 37diff -ruN ppp-2.4.5-orig/pppd/plugins/radius/Makefile.linux ppp-2.4.5/pppd/plugins/radius/Makefile.linux
38+++ ppp-2.4.3/pppdump/Makefile.linux 38--- ppp-2.4.5-orig/pppd/plugins/radius/Makefile.linux 2010-06-30 15:51:12.047676187 +0800
39@@ -17,5 +17,5 @@ 39+++ ppp-2.4.5/pppd/plugins/radius/Makefile.linux 2010-06-30 15:53:47.750182267 +0800
40
41 install:
42 mkdir -p $(BINDIR) $(MANDIR)
43- $(INSTALL) -s -c pppdump $(BINDIR)
44+ $(INSTALL) -c pppdump $(BINDIR)
45 $(INSTALL) -c -m 444 pppdump.8 $(MANDIR)
46--- ppp-2.4.3/pppstats/Makefile.linux~pppd.patch
47+++ ppp-2.4.3/pppstats/Makefile.linux
48@@ -22,7 +22,7 @@
49
50 install: pppstats
51 -mkdir -p $(MANDIR)
52- $(INSTALL) -s -c pppstats $(BINDIR)
53+ $(INSTALL) -c pppstats $(BINDIR)
54 $(INSTALL) -c -m 444 pppstats.8 $(MANDIR)
55
56 pppstats: $(PPPSTATSRCS)
57--- ppp-2.4.3/pppd/plugins/rp-pppoe/Makefile.linux~pppd.patch
58+++ ppp-2.4.3/pppd/plugins/rp-pppoe/Makefile.linux
59@@ -39,9 +39,9 @@
60
61 install: all
62 $(INSTALL) -d -m 755 $(LIBDIR)
63- $(INSTALL) -s -c -m 4550 rp-pppoe.so $(LIBDIR)
64+ $(INSTALL) -c -m 4550 rp-pppoe.so $(LIBDIR)
65 $(INSTALL) -d -m 755 $(BINDIR)
66- $(INSTALL) -s -c -m 555 pppoe-discovery $(BINDIR)
67+ $(INSTALL) -c -m 555 pppoe-discovery $(BINDIR)
68
69 clean:
70 rm -f *.o *.so
71--- ppp-2.4.3/pppd/plugins/radius/Makefile.linux~pppd.patch
72+++ ppp-2.4.3/pppd/plugins/radius/Makefile.linux
73@@ -36,11 +36,11 @@ 40@@ -36,11 +36,11 @@
74 41
75 install: all 42 install: all
@@ -87,3 +54,40 @@
87 54
88 radius.so: radius.o libradiusclient.a 55 radius.so: radius.o libradiusclient.a
89 $(CC) -o radius.so -shared radius.o libradiusclient.a 56 $(CC) -o radius.so -shared radius.o libradiusclient.a
57diff -ruN ppp-2.4.5-orig/pppd/plugins/rp-pppoe/Makefile.linux ppp-2.4.5/pppd/plugins/rp-pppoe/Makefile.linux
58--- ppp-2.4.5-orig/pppd/plugins/rp-pppoe/Makefile.linux 2010-06-30 15:51:12.047676187 +0800
59+++ ppp-2.4.5/pppd/plugins/rp-pppoe/Makefile.linux 2010-06-30 15:53:15.454486877 +0800
60@@ -43,9 +43,9 @@
61
62 install: all
63 $(INSTALL) -d -m 755 $(LIBDIR)
64- $(INSTALL) -s -c -m 4550 rp-pppoe.so $(LIBDIR)
65+ $(INSTALL) -c -m 4550 rp-pppoe.so $(LIBDIR)
66 $(INSTALL) -d -m 755 $(BINDIR)
67- $(INSTALL) -s -c -m 555 pppoe-discovery $(BINDIR)
68+ $(INSTALL) -c -m 555 pppoe-discovery $(BINDIR)
69
70 clean:
71 rm -f *.o *.so pppoe-discovery
72diff -ruN ppp-2.4.5-orig/pppdump/Makefile.linux ppp-2.4.5/pppdump/Makefile.linux
73--- ppp-2.4.5-orig/pppdump/Makefile.linux 2010-06-30 15:51:12.058183383 +0800
74+++ ppp-2.4.5/pppdump/Makefile.linux 2010-06-30 15:52:25.762183537 +0800
75@@ -17,5 +17,5 @@
76
77 install:
78 mkdir -p $(BINDIR) $(MANDIR)
79- $(INSTALL) -s -c pppdump $(BINDIR)
80+ $(INSTALL) -c pppdump $(BINDIR)
81 $(INSTALL) -c -m 444 pppdump.8 $(MANDIR)
82diff -ruN ppp-2.4.5-orig/pppstats/Makefile.linux ppp-2.4.5/pppstats/Makefile.linux
83--- ppp-2.4.5-orig/pppstats/Makefile.linux 2010-06-30 15:51:12.058183383 +0800
84+++ ppp-2.4.5/pppstats/Makefile.linux 2010-06-30 15:52:42.486341081 +0800
85@@ -22,7 +22,7 @@
86
87 install: pppstats
88 -mkdir -p $(MANDIR)
89- $(INSTALL) -s -c pppstats $(BINDIR)
90+ $(INSTALL) -c pppstats $(BINDIR)
91 $(INSTALL) -c -m 444 pppstats.8 $(MANDIR)
92
93 pppstats: $(PPPSTATSRCS)
diff --git a/meta/packages/ppp/files/poff b/meta/packages/ppp/ppp-2.4.5/poff
index 0521a9406a..0521a9406a 100644
--- a/meta/packages/ppp/files/poff
+++ b/meta/packages/ppp/ppp-2.4.5/poff
diff --git a/meta/packages/ppp/files/pon b/meta/packages/ppp/ppp-2.4.5/pon
index 91c059501a..91c059501a 100644
--- a/meta/packages/ppp/files/pon
+++ b/meta/packages/ppp/ppp-2.4.5/pon
diff --git a/meta/packages/ppp/ppp-2.4.3/pppd-resolv-varrun.patch b/meta/packages/ppp/ppp-2.4.5/pppd-resolv-varrun.patch
index c22d8cc085..c4e61fdd28 100644
--- a/meta/packages/ppp/ppp-2.4.3/pppd-resolv-varrun.patch
+++ b/meta/packages/ppp/ppp-2.4.5/pppd-resolv-varrun.patch
@@ -1,10 +1,9 @@
1The patch comes from OpenEmbedded
2Rebased for ppp-2.4.5. Dongxiao Xu <dongxiao.xu@intel.com>
1 3
2# 4diff -ruN ppp-2.4.5-orig/pppd/ipcp.c ppp-2.4.5/pppd/ipcp.c
3# Patch managed by http://www.holgerschurig.de/patcher.html 5--- ppp-2.4.5-orig/pppd/ipcp.c 2010-06-30 15:51:12.050166398 +0800
4# 6+++ ppp-2.4.5/pppd/ipcp.c 2010-06-30 17:02:33.930393283 +0800
5
6--- ppp-2.4.3/pppd/ipcp.c~pppd-resolv-varrun.patch
7+++ ppp-2.4.3/pppd/ipcp.c
8@@ -55,6 +55,8 @@ 7@@ -55,6 +55,8 @@
9 #include <sys/socket.h> 8 #include <sys/socket.h>
10 #include <netinet/in.h> 9 #include <netinet/in.h>
@@ -14,7 +13,7 @@
14 13
15 #include "pppd.h" 14 #include "pppd.h"
16 #include "fsm.h" 15 #include "fsm.h"
17@@ -2032,6 +2034,14 @@ 16@@ -2095,6 +2097,14 @@
18 u_int32_t peerdns1, peerdns2; 17 u_int32_t peerdns1, peerdns2;
19 { 18 {
20 FILE *f; 19 FILE *f;
@@ -29,9 +28,10 @@
29 28
30 f = fopen(_PATH_RESOLV, "w"); 29 f = fopen(_PATH_RESOLV, "w");
31 if (f == NULL) { 30 if (f == NULL) {
32--- ppp-2.4.3/pppd/pathnames.h~pppd-resolv-varrun.patch 31diff -ruN ppp-2.4.5-orig/pppd/pathnames.h ppp-2.4.5/pppd/pathnames.h
33+++ ppp-2.4.3/pppd/pathnames.h 32--- ppp-2.4.5-orig/pppd/pathnames.h 2010-06-30 15:51:12.043682063 +0800
34@@ -29,7 +29,8 @@ 33+++ ppp-2.4.5/pppd/pathnames.h 2010-06-30 17:03:20.594371055 +0800
34@@ -30,7 +30,8 @@
35 #define _PATH_TTYOPT _ROOT_PATH "/etc/ppp/options." 35 #define _PATH_TTYOPT _ROOT_PATH "/etc/ppp/options."
36 #define _PATH_CONNERRS _ROOT_PATH "/etc/ppp/connect-errors" 36 #define _PATH_CONNERRS _ROOT_PATH "/etc/ppp/connect-errors"
37 #define _PATH_PEERFILES _ROOT_PATH "/etc/ppp/peers/" 37 #define _PATH_PEERFILES _ROOT_PATH "/etc/ppp/peers/"
diff --git a/meta/packages/ppp/ppp_2.4.3.bb b/meta/packages/ppp/ppp_2.4.5.bb
index 092bec18c4..e9caf3d13e 100644
--- a/meta/packages/ppp/ppp_2.4.3.bb
+++ b/meta/packages/ppp/ppp_2.4.5.bb
@@ -1,25 +1,29 @@
1DESCRIPTION = "ppp (Paul's PPP Package) is an open source package which implements \
2the Point-to-Point Protocol (PPP) on Linux and Solaris systems."
1SECTION = "console/network" 3SECTION = "console/network"
2DESCRIPTION = "Point-to-Point Protocol (PPP) daemon"
3HOMEPAGE = "http://samba.org/ppp/" 4HOMEPAGE = "http://samba.org/ppp/"
5BUGTRACKER = "http://ppp.samba.org/cgi-bin/ppp-bugs"
4DEPENDS = "libpcap" 6DEPENDS = "libpcap"
5LICENSE = "BSD GPLv2" 7LICENSE = "BSD & GPLv2+ & LGPLv2+ & public domain"
6PR = "r3" 8LIC_FILES_CHKSUM = "file://pppd/ccp.c;beginline=1;endline=29;md5=e2c43fe6e81ff77d87dc9c290a424dea \
9 file://pppd/plugins/passprompt.c;beginline=1;endline=10;md5=3bcbcdbf0e369c9a3e0b8c8275b065d8 \
10 file://pppd/tdb.c;beginline=1;endline=27;md5=4ca3a9991b011038d085d6675ae7c4e6 \
11 file://chat/chat.c;beginline=1;endline=15;md5=0d374b8545ee5c62d7aff1acbd38add2"
12PR = "r0"
7 13
8SRC_URI = "http://ppp.samba.org/ftp/ppp/ppp-${PV}.tar.gz \ 14SRC_URI = "http://ppp.samba.org/ftp/ppp/ppp-${PV}.tar.gz \
9 file://makefile.patch;patch=1 \ 15 file://makefile.patch \
10 file://cifdefroute.patch;patch=1 \ 16 file://cifdefroute.patch \
11 file://pppd-resolv-varrun.patch;patch=1 \ 17 file://pppd-resolv-varrun.patch \
12 file://plugins-fix-CC.patch;patch=1 \ 18 file://enable-ipv6.patch \
13 file://pppoatm-makefile.patch;patch=1 \ 19 file://makefile-remove-hard-usr-reference.patch \
14 file://enable-ipv6.patch;patch=1 \ 20 file://pon \
15 file://makefile-remove-hard-usr-reference.patch;patch=1 \ 21 file://poff \
16 file://pon \ 22 file://init \
17 file://poff \ 23 file://ip-up \
18 file://init \ 24 file://ip-down \
19 file://ip-up \ 25 file://08setupdns \
20 file://ip-down \ 26 file://92removedns"
21 file://08setupdns \
22 file://92removedns"
23 27
24SRC_URI_append_nylon = " file://ppp-tdbread.patch;patch=1" 28SRC_URI_append_nylon = " file://ppp-tdbread.patch;patch=1"
25 29
@@ -33,7 +37,7 @@ do_install_append () {
33 mkdir -p ${D}${bindir}/ ${D}${sysconfdir}/init.d 37 mkdir -p ${D}${bindir}/ ${D}${sysconfdir}/init.d
34 mkdir -p ${D}${sysconfdir}/ppp/ip-up.d/ 38 mkdir -p ${D}${sysconfdir}/ppp/ip-up.d/
35 mkdir -p ${D}${sysconfdir}/ppp/ip-down.d/ 39 mkdir -p ${D}${sysconfdir}/ppp/ip-down.d/
36 install -m 0755 ${WORKDIR}/pon ${D}${bindir}/pon 40 install -m 0755 ${WORKDIR}/pon ${D}${bindir}/pon
37 install -m 0755 ${WORKDIR}/poff ${D}${bindir}/poff 41 install -m 0755 ${WORKDIR}/poff ${D}${bindir}/poff
38 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/ppp 42 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/ppp
39 install -m 0755 ${WORKDIR}/ip-up ${D}${sysconfdir}/ppp/ 43 install -m 0755 ${WORKDIR}/ip-up ${D}${sysconfdir}/ppp/