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>
This commit is contained in:
parent
4cf7528910
commit
057d630962
|
@ -1,19 +0,0 @@
|
||||||
--- ppp-2.4.3/pppd/Makefile.linux.orig 2006-01-17 15:09:56.000000000 +0000
|
|
||||||
+++ ppp-2.4.3/pppd/Makefile.linux 2006-01-17 15:10:21.000000000 +0000
|
|
||||||
@@ -117,12 +117,12 @@
|
|
||||||
#LIBS += -lshadow $(LIBS)
|
|
||||||
endif
|
|
||||||
|
|
||||||
-ifneq ($(wildcard /usr/include/crypt.h),)
|
|
||||||
+#ifneq ($(wildcard /usr/include/crypt.h),)
|
|
||||||
CFLAGS += -DHAVE_CRYPT_H=1
|
|
||||||
-endif
|
|
||||||
-ifneq ($(wildcard /usr/lib/libcrypt.*),)
|
|
||||||
+#endif
|
|
||||||
+#ifneq ($(wildcard /usr/lib/libcrypt.*),)
|
|
||||||
LIBS += -lcrypt
|
|
||||||
-endif
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
ifdef NEEDDES
|
|
||||||
ifndef USE_CRYPT
|
|
|
@ -1,7 +0,0 @@
|
||||||
--- ppp-2.4.3/pppd/plugins/Makefile.linux~ 2004-11-13 23:57:35.000000000 -0800
|
|
||||||
+++ ppp-2.4.3/pppd/plugins/Makefile.linux 2005-08-11 17:19:28.000000000 -0700
|
|
||||||
@@ -1,4 +1,3 @@
|
|
||||||
-CC = gcc
|
|
||||||
COPTS = -O2 -g
|
|
||||||
CFLAGS = $(COPTS) -I.. -I../../include -fPIC
|
|
||||||
LDFLAGS = -shared
|
|
|
@ -1,7 +0,0 @@
|
||||||
--- ppp-2.4.3/pppd/plugins/pppoatm/Makefile.linux.orig 2005-10-26 20:38:50.990298750 +0100
|
|
||||||
+++ ppp-2.4.3/pppd/plugins/pppoatm/Makefile.linux 2005-10-26 20:39:05.583210750 +0100
|
|
||||||
@@ -1,4 +1,3 @@
|
|
||||||
-CC = gcc
|
|
||||||
COPTS = -O2 -g
|
|
||||||
CFLAGS = $(COPTS) -I../.. -I../../../include -fPIC
|
|
||||||
LDFLAGS = -shared
|
|
|
@ -1,37 +1,37 @@
|
||||||
|
This patch comes from OpenEmbedded.
|
||||||
|
The original patch is from Debian / SuSE to implement replacedefaultroute
|
||||||
|
Rebased it to fit ppp-2.4.5. Dongxiao Xu <dongxiao.xu@intel.com>
|
||||||
|
|
||||||
#
|
diff -urN ppp-2.4.5-orig/pppd/ipcp.c ppp-2.4.5/pppd/ipcp.c
|
||||||
# Patch managed by http://www.holgerschurig.de/patcher.html
|
--- ppp-2.4.5-orig/pppd/ipcp.c 2010-06-30 15:51:12.050166398 +0800
|
||||||
#
|
+++ ppp-2.4.5/pppd/ipcp.c 2010-06-30 16:40:00.478716855 +0800
|
||||||
|
@@ -198,6 +198,16 @@
|
||||||
--- ppp-2.4.3/pppd/ipcp.c~cifdefroute.patch
|
|
||||||
+++ ppp-2.4.3/pppd/ipcp.c
|
|
||||||
@@ -197,6 +197,16 @@
|
|
||||||
"disable defaultroute option", OPT_ALIAS | OPT_A2CLR,
|
"disable defaultroute option", OPT_ALIAS | OPT_A2CLR,
|
||||||
&ipcp_wantoptions[0].default_route },
|
&ipcp_wantoptions[0].default_route },
|
||||||
|
|
||||||
+#ifdef __linux__
|
+#ifdef __linux__
|
||||||
+ { "replacedefaultroute", o_bool,
|
+ { "replacedefaultroute", o_bool,
|
||||||
+ &ipcp_wantoptions[0].replace_default_route,
|
+ &ipcp_wantoptions[0].replace_default_route,
|
||||||
+ "Replace default route", 1
|
+ "Replace default route", 1
|
||||||
+ },
|
+ },
|
||||||
+ { "noreplacedefaultroute", o_bool,
|
+ { "noreplacedefaultroute", o_bool,
|
||||||
+ &ipcp_allowoptions[0].replace_default_route,
|
+ &ipcp_allowoptions[0].replace_default_route,
|
||||||
+ "Never replace default route", OPT_A2COPY,
|
+ "Never replace default route", OPT_A2COPY,
|
||||||
+ &ipcp_wantoptions[0].replace_default_route },
|
+ &ipcp_wantoptions[0].replace_default_route },
|
||||||
+#endif
|
+#endif
|
||||||
{ "proxyarp", o_bool, &ipcp_wantoptions[0].proxy_arp,
|
{ "proxyarp", o_bool, &ipcp_wantoptions[0].proxy_arp,
|
||||||
"Add proxy ARP entry", OPT_ENABLE|1, &ipcp_allowoptions[0].proxy_arp },
|
"Add proxy ARP entry", OPT_ENABLE|1, &ipcp_allowoptions[0].proxy_arp },
|
||||||
{ "noproxyarp", o_bool, &ipcp_allowoptions[0].proxy_arp,
|
{ "noproxyarp", o_bool, &ipcp_allowoptions[0].proxy_arp,
|
||||||
@@ -263,7 +273,7 @@
|
@@ -271,7 +281,7 @@
|
||||||
ip_active_pkt
|
ip_active_pkt
|
||||||
};
|
};
|
||||||
|
|
||||||
-static void ipcp_clear_addrs __P((int, u_int32_t, u_int32_t));
|
-static void ipcp_clear_addrs __P((int, u_int32_t, u_int32_t));
|
||||||
+static void ipcp_clear_addrs __P((int, u_int32_t, u_int32_t, bool));
|
+static void ipcp_clear_addrs __P((int, u_int32_t, u_int32_t, bool));
|
||||||
static void ipcp_script __P((char *)); /* Run an up/down script */
|
static void ipcp_script __P((char *, int)); /* Run an up/down script */
|
||||||
static void ipcp_script_done __P((void *));
|
static void ipcp_script_done __P((void *));
|
||||||
|
|
||||||
@@ -1659,7 +1669,12 @@
|
@@ -1742,7 +1752,12 @@
|
||||||
if (!sifnpmode(u, PPP_IP, NPMODE_QUEUE))
|
if (!sifnpmode(u, PPP_IP, NPMODE_QUEUE))
|
||||||
return 0;
|
return 0;
|
||||||
if (wo->default_route)
|
if (wo->default_route)
|
||||||
|
@ -39,12 +39,12 @@
|
||||||
if (sifdefaultroute(u, wo->ouraddr, wo->hisaddr))
|
if (sifdefaultroute(u, wo->ouraddr, wo->hisaddr))
|
||||||
+#else
|
+#else
|
||||||
+ if (sifdefaultroute(u, wo->ouraddr, wo->hisaddr,
|
+ if (sifdefaultroute(u, wo->ouraddr, wo->hisaddr,
|
||||||
+ wo->replace_default_route))
|
+ wo->replace_default_route))
|
||||||
+#endif
|
+#endif
|
||||||
default_route_set[u] = 1;
|
default_route_set[u] = 1;
|
||||||
if (wo->proxy_arp)
|
if (wo->proxy_arp)
|
||||||
if (sifproxyarp(u, wo->hisaddr))
|
if (sifproxyarp(u, wo->hisaddr))
|
||||||
@@ -1741,7 +1756,8 @@
|
@@ -1830,7 +1845,8 @@
|
||||||
*/
|
*/
|
||||||
if (demand) {
|
if (demand) {
|
||||||
if (go->ouraddr != wo->ouraddr || ho->hisaddr != wo->hisaddr) {
|
if (go->ouraddr != wo->ouraddr || ho->hisaddr != wo->hisaddr) {
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
if (go->ouraddr != wo->ouraddr) {
|
if (go->ouraddr != wo->ouraddr) {
|
||||||
warn("Local IP address changed to %I", go->ouraddr);
|
warn("Local IP address changed to %I", go->ouraddr);
|
||||||
script_setenv("OLDIPLOCAL", ip_ntoa(wo->ouraddr), 0);
|
script_setenv("OLDIPLOCAL", ip_ntoa(wo->ouraddr), 0);
|
||||||
@@ -1766,7 +1782,12 @@
|
@@ -1855,7 +1871,12 @@
|
||||||
|
|
||||||
/* assign a default route through the interface if required */
|
/* assign a default route through the interface if required */
|
||||||
if (ipcp_wantoptions[f->unit].default_route)
|
if (ipcp_wantoptions[f->unit].default_route)
|
||||||
|
@ -67,7 +67,7 @@
|
||||||
default_route_set[f->unit] = 1;
|
default_route_set[f->unit] = 1;
|
||||||
|
|
||||||
/* Make a proxy ARP entry if requested. */
|
/* Make a proxy ARP entry if requested. */
|
||||||
@@ -1813,7 +1834,12 @@
|
@@ -1905,7 +1926,12 @@
|
||||||
|
|
||||||
/* assign a default route through the interface if required */
|
/* assign a default route through the interface if required */
|
||||||
if (ipcp_wantoptions[f->unit].default_route)
|
if (ipcp_wantoptions[f->unit].default_route)
|
||||||
|
@ -80,7 +80,7 @@
|
||||||
default_route_set[f->unit] = 1;
|
default_route_set[f->unit] = 1;
|
||||||
|
|
||||||
/* Make a proxy ARP entry if requested. */
|
/* Make a proxy ARP entry if requested. */
|
||||||
@@ -1890,7 +1916,7 @@
|
@@ -1983,7 +2009,7 @@
|
||||||
sifnpmode(f->unit, PPP_IP, NPMODE_DROP);
|
sifnpmode(f->unit, PPP_IP, NPMODE_DROP);
|
||||||
sifdown(f->unit);
|
sifdown(f->unit);
|
||||||
ipcp_clear_addrs(f->unit, ipcp_gotoptions[f->unit].ouraddr,
|
ipcp_clear_addrs(f->unit, ipcp_gotoptions[f->unit].ouraddr,
|
||||||
|
@ -89,7 +89,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Execute the ip-down script */
|
/* Execute the ip-down script */
|
||||||
@@ -1906,16 +1932,25 @@
|
@@ -1999,12 +2025,21 @@
|
||||||
* proxy arp entries, etc.
|
* proxy arp entries, etc.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
|
@ -100,11 +100,7 @@
|
||||||
u_int32_t hisaddr; /* remote address */
|
u_int32_t hisaddr; /* remote address */
|
||||||
+ bool replacedefaultroute;
|
+ bool replacedefaultroute;
|
||||||
{
|
{
|
||||||
if (proxy_arp_set[unit]) {
|
- if (proxy_arp_set[unit]) {
|
||||||
cifproxyarp(unit, hisaddr);
|
|
||||||
proxy_arp_set[unit] = 0;
|
|
||||||
}
|
|
||||||
- if (default_route_set[unit]) {
|
|
||||||
+ /* If replacedefaultroute, sifdefaultroute will be called soon
|
+ /* If replacedefaultroute, sifdefaultroute will be called soon
|
||||||
+ * with replacedefaultroute set and that will overwrite the current
|
+ * with replacedefaultroute set and that will overwrite the current
|
||||||
+ * default route. This is the case only when doing demand, otherwise
|
+ * default route. This is the case only when doing demand, otherwise
|
||||||
|
@ -114,22 +110,24 @@
|
||||||
+ * is one saved by an sifdefaultroute with replacedefaultroute.
|
+ * is one saved by an sifdefaultroute with replacedefaultroute.
|
||||||
+ */
|
+ */
|
||||||
+ if (!replacedefaultroute && default_route_set[unit]) {
|
+ if (!replacedefaultroute && default_route_set[unit]) {
|
||||||
cifdefaultroute(unit, ouraddr, hisaddr);
|
cifproxyarp(unit, hisaddr);
|
||||||
default_route_set[unit] = 0;
|
proxy_arp_set[unit] = 0;
|
||||||
}
|
}
|
||||||
--- ppp-2.4.3/pppd/ipcp.h~cifdefroute.patch
|
diff -urN ppp-2.4.5-orig/pppd/ipcp.h ppp-2.4.5/pppd/ipcp.h
|
||||||
+++ ppp-2.4.3/pppd/ipcp.h
|
--- ppp-2.4.5-orig/pppd/ipcp.h 2010-06-30 15:51:12.043682063 +0800
|
||||||
|
+++ ppp-2.4.5/pppd/ipcp.h 2010-06-30 16:40:49.586203129 +0800
|
||||||
@@ -70,6 +70,7 @@
|
@@ -70,6 +70,7 @@
|
||||||
bool old_addrs; /* Use old (IP-Addresses) option? */
|
bool old_addrs; /* Use old (IP-Addresses) option? */
|
||||||
bool req_addr; /* Ask peer to send IP address? */
|
bool req_addr; /* Ask peer to send IP address? */
|
||||||
bool default_route; /* Assign default route through interface? */
|
bool default_route; /* Assign default route through interface? */
|
||||||
+ bool replace_default_route; /* Replace default route through interface? */
|
+ bool replace_default_route; /* Replace default route through interface? */
|
||||||
bool proxy_arp; /* Make proxy ARP entry for peer? */
|
bool proxy_arp; /* Make proxy ARP entry for peer? */
|
||||||
bool neg_vj; /* Van Jacobson Compression? */
|
bool neg_vj; /* Van Jacobson Compression? */
|
||||||
bool old_vj; /* use old (short) form of VJ option? */
|
bool old_vj; /* use old (short) form of VJ option? */
|
||||||
--- ppp-2.4.3/pppd/pppd.8~cifdefroute.patch
|
diff -urN ppp-2.4.5-orig/pppd/pppd.8 ppp-2.4.5/pppd/pppd.8
|
||||||
+++ ppp-2.4.3/pppd/pppd.8
|
--- ppp-2.4.5-orig/pppd/pppd.8 2010-06-30 15:51:12.043682063 +0800
|
||||||
@@ -120,6 +120,13 @@
|
+++ ppp-2.4.5/pppd/pppd.8 2010-06-30 16:42:47.102413859 +0800
|
||||||
|
@@ -121,6 +121,13 @@
|
||||||
This entry is removed when the PPP connection is broken. This option
|
This entry is removed when the PPP connection is broken. This option
|
||||||
is privileged if the \fInodefaultroute\fR option has been specified.
|
is privileged if the \fInodefaultroute\fR option has been specified.
|
||||||
.TP
|
.TP
|
||||||
|
@ -143,7 +141,7 @@
|
||||||
.B disconnect \fIscript
|
.B disconnect \fIscript
|
||||||
Execute the command specified by \fIscript\fR, by passing it to a
|
Execute the command specified by \fIscript\fR, by passing it to a
|
||||||
shell, after
|
shell, after
|
||||||
@@ -701,7 +708,12 @@
|
@@ -717,7 +724,12 @@
|
||||||
.TP
|
.TP
|
||||||
.B nodefaultroute
|
.B nodefaultroute
|
||||||
Disable the \fIdefaultroute\fR option. The system administrator who
|
Disable the \fIdefaultroute\fR option. The system administrator who
|
||||||
|
@ -157,9 +155,10 @@
|
||||||
can do so by placing this option in the /etc/ppp/options file.
|
can do so by placing this option in the /etc/ppp/options file.
|
||||||
.TP
|
.TP
|
||||||
.B nodeflate
|
.B nodeflate
|
||||||
--- ppp-2.4.3/pppd/pppd.h~cifdefroute.patch
|
diff -urN ppp-2.4.5-orig/pppd/pppd.h ppp-2.4.5/pppd/pppd.h
|
||||||
+++ ppp-2.4.3/pppd/pppd.h
|
--- ppp-2.4.5-orig/pppd/pppd.h 2010-06-30 15:51:12.050166398 +0800
|
||||||
@@ -640,7 +640,11 @@
|
+++ ppp-2.4.5/pppd/pppd.h 2010-06-30 16:43:36.514148327 +0800
|
||||||
|
@@ -643,7 +643,11 @@
|
||||||
int cif6addr __P((int, eui64_t, eui64_t));
|
int cif6addr __P((int, eui64_t, eui64_t));
|
||||||
/* Remove an IPv6 address from i/f */
|
/* Remove an IPv6 address from i/f */
|
||||||
#endif
|
#endif
|
||||||
|
@ -171,18 +170,19 @@
|
||||||
/* Create default route through i/f */
|
/* Create default route through i/f */
|
||||||
int cifdefaultroute __P((int, u_int32_t, u_int32_t));
|
int cifdefaultroute __P((int, u_int32_t, u_int32_t));
|
||||||
/* Delete default route through i/f */
|
/* Delete default route through i/f */
|
||||||
--- ppp-2.4.3/pppd/sys-linux.c~cifdefroute.patch
|
diff -urN ppp-2.4.5-orig/pppd/sys-linux.c ppp-2.4.5/pppd/sys-linux.c
|
||||||
+++ ppp-2.4.3/pppd/sys-linux.c
|
--- ppp-2.4.5-orig/pppd/sys-linux.c 2010-06-30 15:51:12.050166398 +0800
|
||||||
|
+++ ppp-2.4.5/pppd/sys-linux.c 2010-06-30 16:54:00.362716231 +0800
|
||||||
@@ -206,6 +206,8 @@
|
@@ -206,6 +206,8 @@
|
||||||
|
|
||||||
static int if_is_up; /* Interface has been marked up */
|
static int if_is_up; /* Interface has been marked up */
|
||||||
static u_int32_t default_route_gateway; /* Gateway for default route added */
|
static int have_default_route; /* Gateway for default route added */
|
||||||
+static struct rtentry old_def_rt; /* Old default route */
|
+static struct rtentry old_def_rt; /* Old default route */
|
||||||
+static int default_rt_repl_rest; /* replace and restore old default rt */
|
+static int default_rt_repl_rest; /* replace and restore old default rt */
|
||||||
static u_int32_t proxy_arp_addr; /* Addr for proxy arp entry added */
|
static u_int32_t proxy_arp_addr; /* Addr for proxy arp entry added */
|
||||||
static char proxy_arp_dev[16]; /* Device for proxy arp entry */
|
static char proxy_arp_dev[16]; /* Device for proxy arp entry */
|
||||||
static u_int32_t our_old_addr; /* for detecting address changes */
|
static u_int32_t our_old_addr; /* for detecting address changes */
|
||||||
@@ -1513,6 +1515,9 @@
|
@@ -1537,6 +1539,9 @@
|
||||||
p = NULL;
|
p = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -192,10 +192,24 @@
|
||||||
SIN_ADDR(rt->rt_dst) = strtoul(cols[route_dest_col], NULL, 16);
|
SIN_ADDR(rt->rt_dst) = strtoul(cols[route_dest_col], NULL, 16);
|
||||||
SIN_ADDR(rt->rt_gateway) = strtoul(cols[route_gw_col], NULL, 16);
|
SIN_ADDR(rt->rt_gateway) = strtoul(cols[route_gw_col], NULL, 16);
|
||||||
SIN_ADDR(rt->rt_genmask) = strtoul(cols[route_mask_col], NULL, 16);
|
SIN_ADDR(rt->rt_genmask) = strtoul(cols[route_mask_col], NULL, 16);
|
||||||
@@ -1582,19 +1587,53 @@
|
@@ -1606,20 +1611,51 @@
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
*
|
*
|
||||||
* sifdefaultroute - assign a default route through the address given.
|
* sifdefaultroute - assign a default route through the address given.
|
||||||
|
- */
|
||||||
|
-
|
||||||
|
-int sifdefaultroute (int unit, u_int32_t ouraddr, u_int32_t gateway)
|
||||||
|
-{
|
||||||
|
- struct rtentry rt;
|
||||||
|
-
|
||||||
|
- if (defaultroute_exists(&rt) && strcmp(rt.rt_dev, ifname) != 0) {
|
||||||
|
- if (rt.rt_flags & RTF_GATEWAY)
|
||||||
|
- error("not replacing existing default route via %I",
|
||||||
|
- SIN_ADDR(rt.rt_gateway));
|
||||||
|
- else
|
||||||
|
- error("not replacing existing default route through %s",
|
||||||
|
- rt.rt_dev);
|
||||||
|
- return 0;
|
||||||
+ *
|
+ *
|
||||||
+ * If the global default_rt_repl_rest flag is set, then this function
|
+ * If the global default_rt_repl_rest flag is set, then this function
|
||||||
+ * already replaced the original system defaultroute with some other
|
+ * already replaced the original system defaultroute with some other
|
||||||
|
@ -204,17 +218,12 @@
|
||||||
+ * when pppd sets first a defaultroute it it's temporary ppp0 addresses
|
+ * when pppd sets first a defaultroute it it's temporary ppp0 addresses
|
||||||
+ * and then changes the temporary addresses to the addresses for the real
|
+ * and then changes the temporary addresses to the addresses for the real
|
||||||
+ * ppp connection when it has come up.
|
+ * ppp connection when it has come up.
|
||||||
*/
|
+ */
|
||||||
|
+
|
||||||
-int sifdefaultroute (int unit, u_int32_t ouraddr, u_int32_t gateway)
|
|
||||||
+int sifdefaultroute (int unit, u_int32_t ouraddr, u_int32_t gateway, bool replace)
|
+int sifdefaultroute (int unit, u_int32_t ouraddr, u_int32_t gateway, bool replace)
|
||||||
{
|
+{
|
||||||
- struct rtentry rt;
|
|
||||||
+ struct rtentry rt, tmp_rt;
|
+ struct rtentry rt, tmp_rt;
|
||||||
+ struct rtentry *del_rt = NULL;
|
+ struct rtentry *del_rt = NULL;
|
||||||
|
|
||||||
- if (defaultroute_exists(&rt) && strcmp(rt.rt_dev, ifname) != 0) {
|
|
||||||
- u_int32_t old_gateway = SIN_ADDR(rt.rt_gateway);
|
|
||||||
+
|
+
|
||||||
+ if (default_rt_repl_rest) {
|
+ if (default_rt_repl_rest) {
|
||||||
+ /* We have already reclaced the original defaultroute, if we
|
+ /* We have already reclaced the original defaultroute, if we
|
||||||
|
@ -229,11 +238,6 @@
|
||||||
+ * check if we should save and replace a default route:
|
+ * check if we should save and replace a default route:
|
||||||
+ */
|
+ */
|
||||||
+ u_int32_t old_gateway = SIN_ADDR(old_def_rt.rt_gateway);
|
+ u_int32_t old_gateway = SIN_ADDR(old_def_rt.rt_gateway);
|
||||||
|
|
||||||
- if (old_gateway != gateway)
|
|
||||||
- error("not replacing existing default route to %s [%I]",
|
|
||||||
- rt.rt_dev, old_gateway);
|
|
||||||
- return 0;
|
|
||||||
+ if (old_gateway != gateway) {
|
+ if (old_gateway != gateway) {
|
||||||
+ if (!replace) {
|
+ if (!replace) {
|
||||||
+ error("not replacing default route to %s [%I]",
|
+ error("not replacing default route to %s [%I]",
|
||||||
|
@ -253,8 +257,8 @@
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
|
|
||||||
memset (&rt, '\0', sizeof (rt));
|
memset (&rt, 0, sizeof (rt));
|
||||||
@@ -1616,6 +1655,12 @@
|
@@ -1638,6 +1674,12 @@
|
||||||
error("default route ioctl(SIOCADDRT): %m");
|
error("default route ioctl(SIOCADDRT): %m");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -265,9 +269,9 @@
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+ }
|
+ }
|
||||||
|
|
||||||
default_route_gateway = gateway;
|
have_default_route = 1;
|
||||||
return 1;
|
return 1;
|
||||||
@@ -1651,6 +1696,16 @@
|
@@ -1673,6 +1715,16 @@
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,3 +1,5 @@
|
||||||
|
The patch comes from OpenEmbedded
|
||||||
|
|
||||||
--- ppp-2.4.3/pppd/Makefile.linux.orig 2005-10-28 21:07:40.396359250 +0100
|
--- ppp-2.4.3/pppd/Makefile.linux.orig 2005-10-28 21:07:40.396359250 +0100
|
||||||
+++ ppp-2.4.3/pppd/Makefile.linux 2005-10-28 21:07:54.217223000 +0100
|
+++ ppp-2.4.3/pppd/Makefile.linux 2005-10-28 21:07:54.217223000 +0100
|
||||||
@@ -62,7 +62,7 @@
|
@@ -62,7 +62,7 @@
|
|
@ -0,0 +1,19 @@
|
||||||
|
The patch comes from OpenEmbedded.
|
||||||
|
Rebased for ppp-2.4.5. Dongxiao Xu <dongxiao.xu@intel.com>
|
||||||
|
|
||||||
|
diff -urN ppp-2.4.5-orig/pppd/Makefile.linux ppp-2.4.5/pppd/Makefile.linux
|
||||||
|
--- ppp-2.4.5-orig/pppd/Makefile.linux 2010-06-30 15:51:12.043682063 +0800
|
||||||
|
+++ ppp-2.4.5/pppd/Makefile.linux 2010-06-30 17:08:21.806363042 +0800
|
||||||
|
@@ -117,10 +117,10 @@
|
||||||
|
#LIBS += -lshadow $(LIBS)
|
||||||
|
endif
|
||||||
|
|
||||||
|
-ifneq ($(wildcard /usr/include/crypt.h),)
|
||||||
|
+#ifneq ($(wildcard /usr/include/crypt.h),)
|
||||||
|
CFLAGS += -DHAVE_CRYPT_H=1
|
||||||
|
LIBS += -lcrypt
|
||||||
|
-endif
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
ifdef NEEDDES
|
||||||
|
ifndef USE_CRYPT
|
|
@ -1,21 +1,21 @@
|
||||||
|
The patch comes from OpenEmbedded
|
||||||
|
Rebased for ppp-2.4.5. Dongxiao Xu <dongxiao.xu@intel.com>
|
||||||
|
|
||||||
#
|
diff -ruN ppp-2.4.5-orig/chat/Makefile.linux ppp-2.4.5/chat/Makefile.linux
|
||||||
# Patch managed by http://www.holgerschurig.de/patcher.html
|
--- ppp-2.4.5-orig/chat/Makefile.linux 2010-06-30 15:51:12.050166398 +0800
|
||||||
#
|
+++ ppp-2.4.5/chat/Makefile.linux 2010-06-30 15:51:30.450118446 +0800
|
||||||
|
|
||||||
--- ppp-2.4.3/chat/Makefile.linux~pppd.patch
|
|
||||||
+++ ppp-2.4.3/chat/Makefile.linux
|
|
||||||
@@ -25,7 +25,7 @@
|
@@ -25,7 +25,7 @@
|
||||||
|
|
||||||
install: chat
|
install: chat
|
||||||
mkdir -p $(BINDIR)
|
mkdir -p $(BINDIR) $(MANDIR)
|
||||||
- $(INSTALL) -s -c chat $(BINDIR)
|
- $(INSTALL) -s -c chat $(BINDIR)
|
||||||
+ $(INSTALL) -c chat $(BINDIR)
|
+ $(INSTALL) -c chat $(BINDIR)
|
||||||
$(INSTALL) -c -m 644 chat.8 $(MANDIR)
|
$(INSTALL) -c -m 644 chat.8 $(MANDIR)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
--- ppp-2.4.3/pppd/Makefile.linux~pppd.patch
|
diff -ruN ppp-2.4.5-orig/pppd/Makefile.linux ppp-2.4.5/pppd/Makefile.linux
|
||||||
+++ ppp-2.4.3/pppd/Makefile.linux
|
--- ppp-2.4.5-orig/pppd/Makefile.linux 2010-06-30 15:51:12.043682063 +0800
|
||||||
|
+++ ppp-2.4.5/pppd/Makefile.linux 2010-06-30 15:52:11.214170607 +0800
|
||||||
@@ -99,7 +99,7 @@
|
@@ -99,7 +99,7 @@
|
||||||
CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
|
CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
|
||||||
LIBS += -lsrp -L/usr/local/ssl/lib -lcrypto
|
LIBS += -lsrp -L/usr/local/ssl/lib -lcrypto
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
MANPAGES += srp-entry.8
|
MANPAGES += srp-entry.8
|
||||||
EXTRACLEAN += srp-entry.o
|
EXTRACLEAN += srp-entry.o
|
||||||
NEEDDES=y
|
NEEDDES=y
|
||||||
@@ -202,7 +202,7 @@
|
@@ -200,7 +200,7 @@
|
||||||
install: pppd
|
install: pppd
|
||||||
mkdir -p $(BINDIR) $(MANDIR)
|
mkdir -p $(BINDIR) $(MANDIR)
|
||||||
$(EXTRAINSTALL)
|
$(EXTRAINSTALL)
|
||||||
|
@ -34,42 +34,9 @@
|
||||||
if chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \
|
if chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \
|
||||||
chmod o-rx,u+s $(BINDIR)/pppd; fi
|
chmod o-rx,u+s $(BINDIR)/pppd; fi
|
||||||
$(INSTALL) -c -m 444 pppd.8 $(MANDIR)
|
$(INSTALL) -c -m 444 pppd.8 $(MANDIR)
|
||||||
--- ppp-2.4.3/pppdump/Makefile.linux~pppd.patch
|
diff -ruN ppp-2.4.5-orig/pppd/plugins/radius/Makefile.linux ppp-2.4.5/pppd/plugins/radius/Makefile.linux
|
||||||
+++ ppp-2.4.3/pppdump/Makefile.linux
|
--- ppp-2.4.5-orig/pppd/plugins/radius/Makefile.linux 2010-06-30 15:51:12.047676187 +0800
|
||||||
@@ -17,5 +17,5 @@
|
+++ ppp-2.4.5/pppd/plugins/radius/Makefile.linux 2010-06-30 15:53:47.750182267 +0800
|
||||||
|
|
||||||
install:
|
|
||||||
mkdir -p $(BINDIR) $(MANDIR)
|
|
||||||
- $(INSTALL) -s -c pppdump $(BINDIR)
|
|
||||||
+ $(INSTALL) -c pppdump $(BINDIR)
|
|
||||||
$(INSTALL) -c -m 444 pppdump.8 $(MANDIR)
|
|
||||||
--- ppp-2.4.3/pppstats/Makefile.linux~pppd.patch
|
|
||||||
+++ ppp-2.4.3/pppstats/Makefile.linux
|
|
||||||
@@ -22,7 +22,7 @@
|
|
||||||
|
|
||||||
install: pppstats
|
|
||||||
-mkdir -p $(MANDIR)
|
|
||||||
- $(INSTALL) -s -c pppstats $(BINDIR)
|
|
||||||
+ $(INSTALL) -c pppstats $(BINDIR)
|
|
||||||
$(INSTALL) -c -m 444 pppstats.8 $(MANDIR)
|
|
||||||
|
|
||||||
pppstats: $(PPPSTATSRCS)
|
|
||||||
--- ppp-2.4.3/pppd/plugins/rp-pppoe/Makefile.linux~pppd.patch
|
|
||||||
+++ ppp-2.4.3/pppd/plugins/rp-pppoe/Makefile.linux
|
|
||||||
@@ -39,9 +39,9 @@
|
|
||||||
|
|
||||||
install: all
|
|
||||||
$(INSTALL) -d -m 755 $(LIBDIR)
|
|
||||||
- $(INSTALL) -s -c -m 4550 rp-pppoe.so $(LIBDIR)
|
|
||||||
+ $(INSTALL) -c -m 4550 rp-pppoe.so $(LIBDIR)
|
|
||||||
$(INSTALL) -d -m 755 $(BINDIR)
|
|
||||||
- $(INSTALL) -s -c -m 555 pppoe-discovery $(BINDIR)
|
|
||||||
+ $(INSTALL) -c -m 555 pppoe-discovery $(BINDIR)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *.o *.so
|
|
||||||
--- ppp-2.4.3/pppd/plugins/radius/Makefile.linux~pppd.patch
|
|
||||||
+++ ppp-2.4.3/pppd/plugins/radius/Makefile.linux
|
|
||||||
@@ -36,11 +36,11 @@
|
@@ -36,11 +36,11 @@
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
|
@ -87,3 +54,40 @@
|
||||||
|
|
||||||
radius.so: radius.o libradiusclient.a
|
radius.so: radius.o libradiusclient.a
|
||||||
$(CC) -o radius.so -shared radius.o libradiusclient.a
|
$(CC) -o radius.so -shared radius.o libradiusclient.a
|
||||||
|
diff -ruN ppp-2.4.5-orig/pppd/plugins/rp-pppoe/Makefile.linux ppp-2.4.5/pppd/plugins/rp-pppoe/Makefile.linux
|
||||||
|
--- ppp-2.4.5-orig/pppd/plugins/rp-pppoe/Makefile.linux 2010-06-30 15:51:12.047676187 +0800
|
||||||
|
+++ ppp-2.4.5/pppd/plugins/rp-pppoe/Makefile.linux 2010-06-30 15:53:15.454486877 +0800
|
||||||
|
@@ -43,9 +43,9 @@
|
||||||
|
|
||||||
|
install: all
|
||||||
|
$(INSTALL) -d -m 755 $(LIBDIR)
|
||||||
|
- $(INSTALL) -s -c -m 4550 rp-pppoe.so $(LIBDIR)
|
||||||
|
+ $(INSTALL) -c -m 4550 rp-pppoe.so $(LIBDIR)
|
||||||
|
$(INSTALL) -d -m 755 $(BINDIR)
|
||||||
|
- $(INSTALL) -s -c -m 555 pppoe-discovery $(BINDIR)
|
||||||
|
+ $(INSTALL) -c -m 555 pppoe-discovery $(BINDIR)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *.o *.so pppoe-discovery
|
||||||
|
diff -ruN ppp-2.4.5-orig/pppdump/Makefile.linux ppp-2.4.5/pppdump/Makefile.linux
|
||||||
|
--- ppp-2.4.5-orig/pppdump/Makefile.linux 2010-06-30 15:51:12.058183383 +0800
|
||||||
|
+++ ppp-2.4.5/pppdump/Makefile.linux 2010-06-30 15:52:25.762183537 +0800
|
||||||
|
@@ -17,5 +17,5 @@
|
||||||
|
|
||||||
|
install:
|
||||||
|
mkdir -p $(BINDIR) $(MANDIR)
|
||||||
|
- $(INSTALL) -s -c pppdump $(BINDIR)
|
||||||
|
+ $(INSTALL) -c pppdump $(BINDIR)
|
||||||
|
$(INSTALL) -c -m 444 pppdump.8 $(MANDIR)
|
||||||
|
diff -ruN ppp-2.4.5-orig/pppstats/Makefile.linux ppp-2.4.5/pppstats/Makefile.linux
|
||||||
|
--- ppp-2.4.5-orig/pppstats/Makefile.linux 2010-06-30 15:51:12.058183383 +0800
|
||||||
|
+++ ppp-2.4.5/pppstats/Makefile.linux 2010-06-30 15:52:42.486341081 +0800
|
||||||
|
@@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
install: pppstats
|
||||||
|
-mkdir -p $(MANDIR)
|
||||||
|
- $(INSTALL) -s -c pppstats $(BINDIR)
|
||||||
|
+ $(INSTALL) -c pppstats $(BINDIR)
|
||||||
|
$(INSTALL) -c -m 444 pppstats.8 $(MANDIR)
|
||||||
|
|
||||||
|
pppstats: $(PPPSTATSRCS)
|
|
@ -1,10 +1,9 @@
|
||||||
|
The patch comes from OpenEmbedded
|
||||||
|
Rebased for ppp-2.4.5. Dongxiao Xu <dongxiao.xu@intel.com>
|
||||||
|
|
||||||
#
|
diff -ruN ppp-2.4.5-orig/pppd/ipcp.c ppp-2.4.5/pppd/ipcp.c
|
||||||
# Patch managed by http://www.holgerschurig.de/patcher.html
|
--- ppp-2.4.5-orig/pppd/ipcp.c 2010-06-30 15:51:12.050166398 +0800
|
||||||
#
|
+++ ppp-2.4.5/pppd/ipcp.c 2010-06-30 17:02:33.930393283 +0800
|
||||||
|
|
||||||
--- ppp-2.4.3/pppd/ipcp.c~pppd-resolv-varrun.patch
|
|
||||||
+++ ppp-2.4.3/pppd/ipcp.c
|
|
||||||
@@ -55,6 +55,8 @@
|
@@ -55,6 +55,8 @@
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
|
@ -14,7 +13,7 @@
|
||||||
|
|
||||||
#include "pppd.h"
|
#include "pppd.h"
|
||||||
#include "fsm.h"
|
#include "fsm.h"
|
||||||
@@ -2032,6 +2034,14 @@
|
@@ -2095,6 +2097,14 @@
|
||||||
u_int32_t peerdns1, peerdns2;
|
u_int32_t peerdns1, peerdns2;
|
||||||
{
|
{
|
||||||
FILE *f;
|
FILE *f;
|
||||||
|
@ -29,9 +28,10 @@
|
||||||
|
|
||||||
f = fopen(_PATH_RESOLV, "w");
|
f = fopen(_PATH_RESOLV, "w");
|
||||||
if (f == NULL) {
|
if (f == NULL) {
|
||||||
--- ppp-2.4.3/pppd/pathnames.h~pppd-resolv-varrun.patch
|
diff -ruN ppp-2.4.5-orig/pppd/pathnames.h ppp-2.4.5/pppd/pathnames.h
|
||||||
+++ ppp-2.4.3/pppd/pathnames.h
|
--- ppp-2.4.5-orig/pppd/pathnames.h 2010-06-30 15:51:12.043682063 +0800
|
||||||
@@ -29,7 +29,8 @@
|
+++ ppp-2.4.5/pppd/pathnames.h 2010-06-30 17:03:20.594371055 +0800
|
||||||
|
@@ -30,7 +30,8 @@
|
||||||
#define _PATH_TTYOPT _ROOT_PATH "/etc/ppp/options."
|
#define _PATH_TTYOPT _ROOT_PATH "/etc/ppp/options."
|
||||||
#define _PATH_CONNERRS _ROOT_PATH "/etc/ppp/connect-errors"
|
#define _PATH_CONNERRS _ROOT_PATH "/etc/ppp/connect-errors"
|
||||||
#define _PATH_PEERFILES _ROOT_PATH "/etc/ppp/peers/"
|
#define _PATH_PEERFILES _ROOT_PATH "/etc/ppp/peers/"
|
|
@ -1,25 +1,29 @@
|
||||||
|
DESCRIPTION = "ppp (Paul's PPP Package) is an open source package which implements \
|
||||||
|
the Point-to-Point Protocol (PPP) on Linux and Solaris systems."
|
||||||
SECTION = "console/network"
|
SECTION = "console/network"
|
||||||
DESCRIPTION = "Point-to-Point Protocol (PPP) daemon"
|
|
||||||
HOMEPAGE = "http://samba.org/ppp/"
|
HOMEPAGE = "http://samba.org/ppp/"
|
||||||
|
BUGTRACKER = "http://ppp.samba.org/cgi-bin/ppp-bugs"
|
||||||
DEPENDS = "libpcap"
|
DEPENDS = "libpcap"
|
||||||
LICENSE = "BSD GPLv2"
|
LICENSE = "BSD & GPLv2+ & LGPLv2+ & public domain"
|
||||||
PR = "r3"
|
LIC_FILES_CHKSUM = "file://pppd/ccp.c;beginline=1;endline=29;md5=e2c43fe6e81ff77d87dc9c290a424dea \
|
||||||
|
file://pppd/plugins/passprompt.c;beginline=1;endline=10;md5=3bcbcdbf0e369c9a3e0b8c8275b065d8 \
|
||||||
|
file://pppd/tdb.c;beginline=1;endline=27;md5=4ca3a9991b011038d085d6675ae7c4e6 \
|
||||||
|
file://chat/chat.c;beginline=1;endline=15;md5=0d374b8545ee5c62d7aff1acbd38add2"
|
||||||
|
PR = "r0"
|
||||||
|
|
||||||
SRC_URI = "http://ppp.samba.org/ftp/ppp/ppp-${PV}.tar.gz \
|
SRC_URI = "http://ppp.samba.org/ftp/ppp/ppp-${PV}.tar.gz \
|
||||||
file://makefile.patch;patch=1 \
|
file://makefile.patch \
|
||||||
file://cifdefroute.patch;patch=1 \
|
file://cifdefroute.patch \
|
||||||
file://pppd-resolv-varrun.patch;patch=1 \
|
file://pppd-resolv-varrun.patch \
|
||||||
file://plugins-fix-CC.patch;patch=1 \
|
file://enable-ipv6.patch \
|
||||||
file://pppoatm-makefile.patch;patch=1 \
|
file://makefile-remove-hard-usr-reference.patch \
|
||||||
file://enable-ipv6.patch;patch=1 \
|
file://pon \
|
||||||
file://makefile-remove-hard-usr-reference.patch;patch=1 \
|
file://poff \
|
||||||
file://pon \
|
file://init \
|
||||||
file://poff \
|
file://ip-up \
|
||||||
file://init \
|
file://ip-down \
|
||||||
file://ip-up \
|
file://08setupdns \
|
||||||
file://ip-down \
|
file://92removedns"
|
||||||
file://08setupdns \
|
|
||||||
file://92removedns"
|
|
||||||
|
|
||||||
SRC_URI_append_nylon = " file://ppp-tdbread.patch;patch=1"
|
SRC_URI_append_nylon = " file://ppp-tdbread.patch;patch=1"
|
||||||
|
|
||||||
|
@ -33,7 +37,7 @@ do_install_append () {
|
||||||
mkdir -p ${D}${bindir}/ ${D}${sysconfdir}/init.d
|
mkdir -p ${D}${bindir}/ ${D}${sysconfdir}/init.d
|
||||||
mkdir -p ${D}${sysconfdir}/ppp/ip-up.d/
|
mkdir -p ${D}${sysconfdir}/ppp/ip-up.d/
|
||||||
mkdir -p ${D}${sysconfdir}/ppp/ip-down.d/
|
mkdir -p ${D}${sysconfdir}/ppp/ip-down.d/
|
||||||
install -m 0755 ${WORKDIR}/pon ${D}${bindir}/pon
|
install -m 0755 ${WORKDIR}/pon ${D}${bindir}/pon
|
||||||
install -m 0755 ${WORKDIR}/poff ${D}${bindir}/poff
|
install -m 0755 ${WORKDIR}/poff ${D}${bindir}/poff
|
||||||
install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/ppp
|
install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/ppp
|
||||||
install -m 0755 ${WORKDIR}/ip-up ${D}${sysconfdir}/ppp/
|
install -m 0755 ${WORKDIR}/ip-up ${D}${sysconfdir}/ppp/
|
Loading…
Reference in New Issue