Skip to content

Commit

Permalink
ppp: update to 2.5.0
Browse files Browse the repository at this point in the history
ChangeLog:
https://github.com/ppp-project/ppp/blob/ppp-2.5.0/ChangeLog

Upstreamed patches:
120-debian_ipv6_updown_option.patch [1]
133-fix_sha1_include.patch [2]
140-pppd-Fix-compilation-with-older-glibc-or-kernel-head.patch [3]
141-Expand-byte-count-statistics-to-64-bits-298.patch [4]
142-pppd-Add-support-for-registering-ppp-interface-via-L.patch [5]
143-pppd-Workaround-for-generating-ppp-unit-id-on-Linux-.patch [6]
144-pppd-Retry-registering-interface-when-on-rtnetlink-E.patch [7]

Suppressed patches:
200-makefile.patch [8]
201-mppe_mppc_1.1.patch [9]
203-opt_flags.patch [10]
300-filter-pcap-includes-lib.patch [11]
511-pptp_cflags.patch [12]
600-Revert-pppd-Use-openssl-for-the-DES-instead-of-the-l.patch [13]
610-pppd_compile_fix.patch [14]

[1] ppp-project/ppp@7f8c1a1
[2] ppp-project/ppp@ba7f7e0
[3] ppp-project/ppp@98ec18f
[4] ppp-project/ppp@81ad945
[5] ppp-project/ppp@4a54e34
[6] ppp-project/ppp@44609bf
[7] ppp-project/ppp@089687f
[8] enable_eaptls=no, with_pcap=no, HAVE_CRYPT_H=1 in configure
[9] enable_microsoft_extensions=yes, MPPC support is removed.
[10] fPIC ignored so far
[11] done by autotools
[12] in main patch for pptp plugin
[13] with_openssl=no, already in upstream ppp-des.c
[14] with_static_pcap=yes from patch 310

Signed-off-by: Sergey Ivanov <icegood1980@gmail.com>

* Fix package hash.
* Fix multilink variant build.
* Fix some compile errors.
* Some code format fixes.
* Refactor commit message.
* Rebase git and fix conflicts.
  • Loading branch information
openwrtdiy committed Oct 29, 2024
1 parent 7665658 commit e684b86
Show file tree
Hide file tree
Showing 34 changed files with 249 additions and 3,229 deletions.
84 changes: 45 additions & 39 deletions package/network/services/ppp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,36 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk

PKG_NAME:=ppp
PKG_RELEASE:=6
PKG_VERSION:=2.5.0
PKG_RELEASE:=1

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/paulusmack/ppp
PKG_SOURCE_DATE:=2021-01-04
PKG_SOURCE_VERSION:=4fb319056f168bb8379865b91b4fd3e1ada73f1e
PKG_MIRROR_HASH:=58b415e17bdcac81bb9594a1b2ba65ec90598817850d22e98c1690e8ed0cd3d8
PKG_SOURCE_URL:=https://github.com/ppp-project/ppp
PKG_SOURCE_DATE:=2023-03-18
PKG_SOURCE_VERSION:=760ce18f82670eb81cc186fb792919339a2e2fbe
PKG_MIRROR_HASH:=e7fe5947ce9e59d73f6d2fdec5d2e40832e656b9edad288578391f8f169b8b9b

PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_LICENSE:=BSD-4-Clause
PKG_CPE_ID:=cpe:/a:samba:ppp

PKG_RELEASE_VERSION:=2.4.9
PKG_VERSION:=$(PKG_RELEASE_VERSION)_git$(subst -,,$(PKG_SOURCE_DATE))

PKG_BUILD_DEPENDS:=libpcap

PKG_ASLR_PIE_REGULAR:=1
PKG_BUILD_DEPENDS:=libpcap
PKG_BUILD_FLAGS:=gc-sections lto
PKG_BUILD_PARALLEL:=1
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1

include $(INCLUDE_DIR)/package.mk
CONFIGURE_VARS += \
enable_eaptls=no \
enable_microsoft_extensions=yes \
enable_peap=no

CONFIGURE_ARGS += \
with_openssl=no \
with_pcap=no \
with_static_pcap=yes

define Package/ppp/Default
SECTION:=net
Expand Down Expand Up @@ -194,13 +202,11 @@ $(call Build/Configure/Default,, \
endef

MAKE_FLAGS += COPTS="$(TARGET_CFLAGS)" \
PRECOMPILED_FILTER=1 \
STAGING_DIR="$(STAGING_DIR)"

ifeq ($(BUILD_VARIANT),multilink)
MAKE_FLAGS += HAVE_MULTILINK=y
else
MAKE_FLAGS += HAVE_MULTILINK=
CONFIGURE_VARS += \
enable_multilink=yes
endif

ifdef CONFIG_USE_MUSL
Expand All @@ -209,16 +215,16 @@ endif

define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/include/pppd $(1)/usr/include/
$(CP) $(PKG_INSTALL_DIR)/usr/include/pppd $(1)/usr/include/
endef

define Package/ppp/script_install
endef

define Package/ppp/install
$(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_RELEASE_VERSION)
$(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/pppd $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppd $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/ppp
$(INSTALL_CONF) ./files/etc/ppp/chap-secrets $(1)/etc/ppp/
$(INSTALL_DATA) ./files/etc/ppp/filter $(1)/etc/ppp/
Expand All @@ -233,21 +239,21 @@ endef
Package/ppp-multilink/install=$(Package/ppp/install)

define Package/ppp-mod-pppoa/install
$(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_RELEASE_VERSION)
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_RELEASE_VERSION)/pppoatm.so \
$(1)/usr/lib/pppd/$(PKG_RELEASE_VERSION)/
$(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/pppoatm.so \
$(1)/usr/lib/pppd/$(PKG_VERSION)/
endef

define Package/ppp-mod-pppoe/install
$(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_RELEASE_VERSION)
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_RELEASE_VERSION)/pppoe.so \
$(1)/usr/lib/pppd/$(PKG_RELEASE_VERSION)/
$(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/pppoe.so \
$(1)/usr/lib/pppd/$(PKG_VERSION)/
endef

define Package/ppp-mod-radius/install
$(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_RELEASE_VERSION)
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_RELEASE_VERSION)/radius.so \
$(1)/usr/lib/pppd/$(PKG_RELEASE_VERSION)/
$(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/radius.so \
$(1)/usr/lib/pppd/$(PKG_VERSION)/
$(INSTALL_DIR) $(1)/etc/ppp
$(INSTALL_DATA) ./files/etc/ppp/radius.conf $(1)/etc/ppp/
$(INSTALL_DIR) $(1)/etc/ppp/radius
Expand All @@ -258,43 +264,43 @@ define Package/ppp-mod-radius/install
endef

define Package/ppp-mod-pppol2tp/install
$(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_RELEASE_VERSION)
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_RELEASE_VERSION)/pppol2tp.so \
$(1)/usr/lib/pppd/$(PKG_RELEASE_VERSION)/
$(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/pppol2tp.so \
$(1)/usr/lib/pppd/$(PKG_VERSION)/
endef

define Package/ppp-mod-pptp/install
$(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_RELEASE_VERSION)
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_RELEASE_VERSION)/pptp.so \
$(1)/usr/lib/pppd/$(PKG_RELEASE_VERSION)/
$(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/pptp.so \
$(1)/usr/lib/pppd/$(PKG_VERSION)/
$(INSTALL_DIR) $(1)/etc/ppp
$(INSTALL_DATA) ./files/etc/ppp/options.pptp $(1)/etc/ppp/
endef

define Package/ppp-mod-passwordfd/install
$(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_RELEASE_VERSION)
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_RELEASE_VERSION)/passwordfd.so \
$(1)/usr/lib/pppd/$(PKG_RELEASE_VERSION)/
$(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/passwordfd.so \
$(1)/usr/lib/pppd/$(PKG_VERSION)/
endef

define Package/chat/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/chat $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/chat $(1)/usr/sbin/
endef

define Package/pppdump/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/pppdump $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppdump $(1)/usr/sbin/
endef

define Package/pppstats/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/pppstats $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppstats $(1)/usr/sbin/
endef

define Package/pppoe-discovery/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/pppoe-discovery $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-discovery $(1)/usr/sbin/
endef

$(eval $(call BuildPackage,ppp))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,14 @@ and "UNAME_M" environment variables.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>

--- a/configure
+++ b/configure
@@ -10,9 +10,9 @@ CROSS_COMPILE=
CC=cc
CFLAGS=
--- a/configure.ac
+++ b/configure.ac
@@ -354,7 +354,7 @@ Setting up SunOS kernel module(s)"
fi
}

-system=`uname -s`
-release=`uname -r`
-arch=`uname -m`
+system=${UNAME_S:-`uname -s`}
+release=${UNAME_R:-`uname -r`}
+arch=${UNAME_M:-`uname -m`}
state="unknown"

case $system in
- release=`uname -r`
+ release=${UNAME_R:-`uname -r`}
karch=`/usr/bin/isainfo -k`
makext="sol2"
archvariant=
22 changes: 11 additions & 11 deletions package/network/services/ppp/patches/105-debian_demand.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/pppd/demand.c
+++ b/pppd/demand.c
@@ -36,6 +36,8 @@
@@ -40,6 +40,8 @@
#include <errno.h>
#include <fcntl.h>
#include <netdb.h>
Expand All @@ -9,16 +9,16 @@
#include <sys/param.h>
#include <sys/types.h>
#include <sys/wait.h>
@@ -43,6 +45,8 @@
@@ -47,6 +49,8 @@
#include <sys/resource.h>
#include <sys/stat.h>
#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
#ifdef PPP_FILTER
#ifdef PPP_WITH_FILTER
#include <pcap-bpf.h>
#endif
@@ -218,6 +222,14 @@ loop_chars(unsigned char *p, int n)
@@ -223,6 +227,14 @@ loop_chars(unsigned char *p, int n)
int c, rv;

rv = 0;
Expand All @@ -33,7 +33,7 @@
for (; n > 0; --n) {
c = *p++;
if (c == PPP_FLAG) {
@@ -294,16 +306,100 @@ loop_frame(unsigned char *frame, int len
@@ -299,16 +311,100 @@ loop_frame(unsigned char *frame, int len
* loopback, now that the real serial link is up.
*/
void
Expand Down Expand Up @@ -137,7 +137,7 @@
} else {
--- a/pppd/ipcp.c
+++ b/pppd/ipcp.c
@@ -1850,7 +1850,7 @@ ipcp_up(fsm *f)
@@ -1911,7 +1911,7 @@ ipcp_up(fsm *f)
proxy_arp_set[f->unit] = 1;

}
Expand All @@ -148,7 +148,7 @@
} else {
--- a/pppd/ipv6cp.c
+++ b/pppd/ipv6cp.c
@@ -1253,7 +1253,7 @@ ipv6cp_up(fsm *f)
@@ -1338,7 +1338,7 @@ ipv6cp_up(fsm *f)
if (sif6defaultroute(f->unit, go->ourid, ho->hisid))
default_route_set[f->unit] = 1;
}
Expand All @@ -157,14 +157,14 @@
sifnpmode(f->unit, PPP_IPV6, NPMODE_PASS);

} else {
--- a/pppd/pppd.h
+++ b/pppd/pppd.h
@@ -598,7 +598,7 @@ void demand_conf(void); /* config interf
--- a/pppd/pppd-private.h
+++ b/pppd/pppd-private.h
@@ -362,7 +362,7 @@ void demand_conf(void); /* config interf
void demand_block(void); /* set all NPs to queue up packets */
void demand_unblock(void); /* set all NPs to pass packets */
void demand_discard(void); /* set all NPs to discard packets */
-void demand_rexmit(int); /* retransmit saved frames for an NP */
+void demand_rexmit(int, u_int32_t); /* retransmit saved frames for an NP*/
+void demand_rexmit(int, u_int32_t); /* retransmit saved frames for an NP */
int loop_chars(unsigned char *, int); /* process chars from loopback */
int loop_frame(unsigned char *, int); /* should we bring link up? */

This file was deleted.

11 changes: 0 additions & 11 deletions package/network/services/ppp/patches/133-fix_sha1_include.patch

This file was deleted.

Loading

0 comments on commit e684b86

Please sign in to comment.