aboutsummaryrefslogtreecommitdiffstats
path: root/package/network
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2017-02-11 16:19:15 +0100
committerFelix Fietkau <nbd@nbd.name>2017-02-11 19:33:35 +0100
commitdc4844b18b4761a375033c34c0ffd16bc8fafd9e (patch)
treef39d85319b330a376c19abab2eedf5db48566939 /package/network
parente0e5f8ca2f6feaf9dc30d0c29619f2545800e790 (diff)
downloadupstream-dc4844b18b4761a375033c34c0ffd16bc8fafd9e.tar.gz
upstream-dc4844b18b4761a375033c34c0ffd16bc8fafd9e.tar.bz2
upstream-dc4844b18b4761a375033c34c0ffd16bc8fafd9e.zip
pppd: fix compile issues with glibc 2.25
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/network')
-rw-r--r--package/network/services/ppp/patches/140-pppoe_compile_fix.patch62
-rw-r--r--package/network/services/ppp/patches/520-uniq.patch12
2 files changed, 28 insertions, 46 deletions
diff --git a/package/network/services/ppp/patches/140-pppoe_compile_fix.patch b/package/network/services/ppp/patches/140-pppoe_compile_fix.patch
index 2983a75c42..d9c9b83a33 100644
--- a/package/network/services/ppp/patches/140-pppoe_compile_fix.patch
+++ b/package/network/services/ppp/patches/140-pppoe_compile_fix.patch
@@ -1,23 +1,27 @@
---- a/pppd/plugins/rp-pppoe/plugin.c
-+++ b/pppd/plugins/rp-pppoe/plugin.c
-@@ -46,10 +46,10 @@ static char const RCSID[] =
- #include <unistd.h>
- #include <fcntl.h>
- #include <signal.h>
--#include <net/ethernet.h>
- #include <net/if_arp.h>
- #include <linux/ppp_defs.h>
- #include <linux/if_pppox.h>
-+#include <linux/if_ether.h>
-
- #ifndef _ROOT_PATH
- #define _ROOT_PATH ""
--- a/pppd/plugins/rp-pppoe/pppoe.h
+++ b/pppd/plugins/rp-pppoe/pppoe.h
-@@ -86,17 +86,6 @@ typedef unsigned long UINT32_t;
+@@ -48,11 +48,7 @@
+ #endif
- #include <netinet/in.h>
+ /* Ugly header files on some Linux boxes... */
+-#if defined(HAVE_LINUX_IF_H)
+-#include <linux/if.h>
+-#elif defined(HAVE_NET_IF_H)
+ #include <net/if.h>
+-#endif
+ #ifdef HAVE_NET_IF_TYPES_H
+ #include <net/if_types.h>
+@@ -80,22 +76,8 @@ typedef unsigned long UINT32_t;
+ #error Could not find a 32-bit integer type
+ #endif
+
+-#ifdef HAVE_LINUX_IF_ETHER_H
+-#include <linux/if_ether.h>
+-#endif
+-
+ #include <netinet/in.h>
+-
-#ifdef HAVE_NETINET_IF_ETHER_H
-#include <sys/types.h>
-
@@ -28,21 +32,10 @@
-#include <netinet/if_ether.h>
-#endif
-#endif
--
++#include <net/ethernet.h>
- /* Ethernet frame types according to RFC 2516 */
---- a/pppd/plugins/rp-pppoe/if.c
-+++ b/pppd/plugins/rp-pppoe/if.c
-@@ -31,7 +31,7 @@ static char const RCSID[] =
- #endif
-
- #ifdef HAVE_NET_ETHERNET_H
--#include <net/ethernet.h>
-+#include <linux/if_ether.h>
- #endif
- #ifdef HAVE_ASM_TYPES_H
--- a/pppd/plugins/rp-pppoe/pppoe-discovery.c
+++ b/pppd/plugins/rp-pppoe/pppoe-discovery.c
@@ -16,6 +16,7 @@
@@ -53,18 +46,7 @@
#ifdef HAVE_UNISTD_H
#include <unistd.h>
-@@ -27,10 +28,6 @@
- #include <linux/if_packet.h>
- #endif
-
--#ifdef HAVE_NET_ETHERNET_H
--#include <net/ethernet.h>
--#endif
--
- #ifdef HAVE_ASM_TYPES_H
- #include <asm/types.h>
- #endif
-@@ -717,6 +714,23 @@ char *xstrdup(const char *s)
+@@ -717,6 +718,23 @@ char *xstrdup(const char *s)
return ret;
}
diff --git a/package/network/services/ppp/patches/520-uniq.patch b/package/network/services/ppp/patches/520-uniq.patch
index 54c0d62712..65d0e96bc0 100644
--- a/package/network/services/ppp/patches/520-uniq.patch
+++ b/package/network/services/ppp/patches/520-uniq.patch
@@ -147,7 +147,7 @@
strlcpy(ppp_devnam, devnam, sizeof(ppp_devnam));
--- a/pppd/plugins/rp-pppoe/pppoe-discovery.c
+++ b/pppd/plugins/rp-pppoe/pppoe-discovery.c
-@@ -344,7 +344,7 @@ packetIsForMe(PPPoEConnection *conn, PPP
+@@ -348,7 +348,7 @@ packetIsForMe(PPPoEConnection *conn, PPP
if (memcmp(packet->ethHdr.h_dest, conn->myEth, ETH_ALEN)) return 0;
/* If we're not using the Host-Unique tag, then accept the packet */
@@ -156,7 +156,7 @@
parsePacket(packet, parseForHostUniq, &forMe);
return forMe;
-@@ -470,16 +470,12 @@ sendPADI(PPPoEConnection *conn)
+@@ -474,16 +474,12 @@ sendPADI(PPPoEConnection *conn)
cursor += namelen + TAG_HDR_SIZE;
/* If we're using Host-Uniq, copy it over */
@@ -179,7 +179,7 @@
}
packet.length = htons(plen);
-@@ -641,7 +637,7 @@ int main(int argc, char *argv[])
+@@ -645,7 +641,7 @@ int main(int argc, char *argv[])
memset(conn, 0, sizeof(PPPoEConnection));
@@ -188,7 +188,7 @@
switch(opt) {
case 'S':
conn->serviceName = xstrdup(optarg);
-@@ -650,7 +646,23 @@ int main(int argc, char *argv[])
+@@ -654,7 +650,23 @@ int main(int argc, char *argv[])
conn->acName = xstrdup(optarg);
break;
case 'U':
@@ -224,7 +224,7 @@
/* How do we access raw Ethernet devices? */
#undef USE_LINUX_PACKET
-@@ -224,7 +226,7 @@ typedef struct PPPoEConnectionStruct {
+@@ -217,7 +219,7 @@ typedef struct PPPoEConnectionStruct {
char *serviceName; /* Desired service name, if any */
char *acName; /* Desired AC name, if any */
int synchronous; /* Use synchronous PPP */
@@ -233,7 +233,7 @@
int printACNames; /* Just print AC names */
FILE *debugFile; /* Debug file for dumping packets */
int numPADOs; /* Number of PADO packets received */
-@@ -280,6 +282,33 @@ void pppoe_printpkt(PPPoEPacket *packet,
+@@ -273,6 +275,33 @@ void pppoe_printpkt(PPPoEPacket *packet,
void (*printer)(void *, char *, ...), void *arg);
void pppoe_log_packet(const char *prefix, PPPoEPacket *packet);