ppp: update to version 2.4.7.git-2019-05-06
authorHans Dedecker <dedeckeh@gmail.com>
Mon, 13 May 2019 13:26:56 +0000 (15:26 +0200)
committerHans Dedecker <dedeckeh@gmail.com>
Mon, 13 May 2019 13:34:42 +0000 (15:34 +0200)
fcb076c Various fixes for errors found by coverity static analysis (#109)
d98ab38 Merge branch 'pppd_print_changes' of https://github.com/nlhintz/ppp into nlhintz-pppd_print_changes

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
package/network/services/ppp/Makefile
package/network/services/ppp/patches/140-pppoe_compile_fix.patch
package/network/services/ppp/patches/150-debug_compile_fix.patch [new file with mode: 0644]
package/network/services/ppp/patches/203-opt_flags.patch
package/network/services/ppp/patches/204-radius_config.patch
package/network/services/ppp/patches/400-simplify_kernel_checks.patch
package/network/services/ppp/patches/520-uniq.patch
package/network/services/ppp/patches/540-save-pppol2tp_fd_str.patch

index e4a90384d46cffee660c80e0ef35890914b1f445..a588540a5d8ac0cf2bcb5d42454fa049b7f68585 100644 (file)
@@ -13,9 +13,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/paulusmack/ppp
-PKG_SOURCE_DATE:=2018-06-23
-PKG_SOURCE_VERSION:=5c765a67fd25f9d84e71ed61ace37c8c97f6be15
-PKG_MIRROR_HASH:=a79e62d0569e3d6a3207f2a693532d34629fb5b3b9d8c1d9b9786ebd1d1de70f
+PKG_SOURCE_DATE:=2019-05-06
+PKG_SOURCE_VERSION:=fcb076c2b24bd8dd73f4be7a9e1712d3a352a376
+PKG_MIRROR_HASH:=9bd92ae9d32c6cee79e5fa55fd26e41c8c889461e3934e4b7519e3acdb91b2f1
 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
 PKG_LICENSE:=BSD-4-Clause
 PKG_CPE_ID:=cpe:/a:samba:ppp
index e25c567033a074de255054ccf61cecae9d6be930..6453ab12c2da127426162b05c2a2b00e74a81125 100644 (file)
@@ -1,6 +1,6 @@
 --- a/pppd/plugins/rp-pppoe/pppoe.h
 +++ b/pppd/plugins/rp-pppoe/pppoe.h
-@@ -52,11 +52,7 @@
+@@ -54,11 +54,7 @@
  #include <netinet/in.h>
  
  /* Ugly header files on some Linux boxes... */
@@ -12,7 +12,7 @@
  
  #ifdef HAVE_NET_IF_TYPES_H
  #include <net/if_types.h>
-@@ -84,20 +80,7 @@ typedef unsigned long UINT32_t;
+@@ -86,20 +82,7 @@ typedef unsigned long UINT32_t;
  #error Could not find a 32-bit integer type
  #endif
  
  
  
  /* Ethernet frame types according to RFC 2516 */
---- a/pppd/plugins/rp-pppoe/Makefile.linux
-+++ b/pppd/plugins/rp-pppoe/Makefile.linux
-@@ -33,7 +33,7 @@ pppoe-discovery: pppoe-discovery.o debug
-       $(CC) $(LDFLAGS) -o pppoe-discovery pppoe-discovery.o debug.o
- pppoe-discovery.o: pppoe-discovery.c
--      $(CC) $(CFLAGS) -c -o pppoe-discovery.o pppoe-discovery.c
-+      $(CC) $(CFLAGS) -I../../.. -c -o pppoe-discovery.o pppoe-discovery.c
- debug.o: debug.c
-       $(CC) $(CFLAGS) -c -o debug.o debug.c
diff --git a/package/network/services/ppp/patches/150-debug_compile_fix.patch b/package/network/services/ppp/patches/150-debug_compile_fix.patch
new file mode 100644 (file)
index 0000000..6c2f5ce
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/pppd/plugins/rp-pppoe/debug.c
++++ b/pppd/plugins/rp-pppoe/debug.c
+@@ -16,6 +16,8 @@
+ static char const RCSID[] =
+ "$Id: debug.c,v 1.2 2008/06/09 08:34:23 paulus Exp $";
++#include <sys/types.h>
++
+ #include "pppoe.h"
+ #include <sys/time.h>
+ #include <time.h>
index e79bbe47460c13553af089d884fbea28f9b05ba1..8dfacf38345b7dbcbfcee837b9ed521d0b43f170 100644 (file)
@@ -50,7 +50,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
 --- a/pppd/plugins/rp-pppoe/Makefile.linux
 +++ b/pppd/plugins/rp-pppoe/Makefile.linux
 @@ -39,7 +39,7 @@ debug.o: debug.c
-       $(CC) $(CFLAGS) -c -o debug.o debug.c
+       $(CC) $(CFLAGS) -I../../.. -c -o debug.o debug.c
  
  rp-pppoe.so: plugin.o discovery.o if.o common.o
 -      $(CC) $(LDFLAGS) -o rp-pppoe.so -shared plugin.o discovery.o if.o common.o
index c97a5350790bd624daafe34f0efc3cb9aec9a7d8..2f30b9d3dcd3678c8b2284a19536d1ba9af892db 100644 (file)
@@ -1,6 +1,6 @@
 --- a/pppd/plugins/radius/config.c
 +++ b/pppd/plugins/radius/config.c
-@@ -369,31 +369,37 @@ static int test_config(char *filename)
+@@ -371,31 +371,37 @@ static int test_config(char *filename)
        }
  #endif
  
index 05cbdb11bab5f66929d7778ffaf872c6810981ce..fcde35276432a55f5e8215e3b7fbdd94a3399375 100644 (file)
@@ -80,7 +80,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
  
  /*
   *  This is the PPP device. Validate the version of the driver at this
-@@ -2727,6 +2734,7 @@ get_pty(master_fdp, slave_fdp, slave_nam
+@@ -2730,6 +2737,7 @@ get_pty(master_fdp, slave_fdp, slave_nam
      }
  #endif /* TIOCGPTN */
  
@@ -88,7 +88,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
      if (sfd < 0) {
        /* the old way - scan through the pty name space */
        for (i = 0; i < 64; ++i) {
-@@ -2745,6 +2753,7 @@ get_pty(master_fdp, slave_fdp, slave_nam
+@@ -2748,6 +2756,7 @@ get_pty(master_fdp, slave_fdp, slave_nam
            }
        }
      }
@@ -138,7 +138,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
      info("RP-PPPoE plugin version %s compiled against pppd %s",
 --- a/pppd/plugins/pppol2tp/pppol2tp.c
 +++ b/pppd/plugins/pppol2tp/pppol2tp.c
-@@ -486,12 +486,7 @@ static void pppol2tp_cleanup(void)
+@@ -490,12 +490,7 @@ static void pppol2tp_cleanup(void)
  
  void plugin_init(void)
  {
index fddb07f253a46de6a99ae257e4c9060b0d50e3e3..38d52dca07b313b8126436c2c46405d4e6b06af2 100644 (file)
      strlcpy(ppp_devnam, devnam, sizeof(ppp_devnam));
 --- a/pppd/plugins/rp-pppoe/pppoe-discovery.c
 +++ b/pppd/plugins/rp-pppoe/pppoe-discovery.c
-@@ -356,7 +356,7 @@ packetIsForMe(PPPoEConnection *conn, PPP
+@@ -357,7 +357,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 */
  
      parsePacket(packet, parseForHostUniq, &forMe);
      return forMe;
-@@ -494,16 +494,12 @@ sendPADI(PPPoEConnection *conn)
+@@ -495,16 +495,12 @@ sendPADI(PPPoEConnection *conn)
      cursor += namelen + TAG_HDR_SIZE;
  
      /* If we're using Host-Uniq, copy it over */
      }
  
      packet.length = htons(plen);
-@@ -669,7 +665,7 @@ int main(int argc, char *argv[])
+@@ -670,7 +666,7 @@ int main(int argc, char *argv[])
      conn->discoveryTimeout = PADI_TIMEOUT;
      conn->discoveryAttempts = MAX_PADI_ATTEMPTS;
  
        switch(opt) {
        case 'S':
            conn->serviceName = xstrdup(optarg);
-@@ -696,7 +692,23 @@ int main(int argc, char *argv[])
+@@ -697,7 +693,23 @@ int main(int argc, char *argv[])
            }
            break;
        case 'U':
 +#include <ctype.h>
 +#include <string.h>
  
/* How do we access raw Ethernet devices? */
- #undef USE_LINUX_PACKET
-@@ -219,7 +221,7 @@ typedef struct PPPoEConnectionStruct {
#include "pppd/pppd.h"                /* For error */
+@@ -221,7 +223,7 @@ typedef struct PPPoEConnectionStruct {
      char *serviceName;                /* Desired service name, if any */
      char *acName;             /* Desired AC name, if any */
      int synchronous;          /* Use synchronous PPP */
      int printACNames;         /* Just print AC names */
      FILE *debugFile;          /* Debug file for dumping packets */
      int numPADOs;             /* Number of PADO packets received */
-@@ -276,6 +278,33 @@ void pppoe_printpkt(PPPoEPacket *packet,
+@@ -278,6 +280,33 @@ void pppoe_printpkt(PPPoEPacket *packet,
                    void (*printer)(void *, char *, ...), void *arg);
  void pppoe_log_packet(const char *prefix, PPPoEPacket *packet);
  
index 7dd2ad844cba74585fdb69c204196fefcb3747c6..d6d44afbd09032621d6e6ec4fe1102f3162c31cf 100644 (file)
@@ -1,8 +1,8 @@
 --- a/pppd/plugins/pppol2tp/pppol2tp.c
 +++ b/pppd/plugins/pppol2tp/pppol2tp.c
-@@ -148,6 +148,10 @@ static int setdevname_pppol2tp(char **ar
-               fatal("PPPoL2TP kernel driver not installed");
-       }
+@@ -152,6 +152,10 @@ static int setdevname_pppol2tp(char **ar
+       if (pppol2tp_fd_str == NULL)
+               novm("PPPoL2TP FD");
  
 +      pppol2tp_fd_str = strdup(*argv);
 +      if (pppol2tp_fd_str == NULL)