Initial Commit
- initial default booting image
This commit is contained in:
184
package/pppd/0001-dhcpv6relay-fix-build-with-gcc-9.x.patch
Normal file
184
package/pppd/0001-dhcpv6relay-fix-build-with-gcc-9.x.patch
Normal file
@@ -0,0 +1,184 @@
|
||||
From 56f6f09035b034b96c84637160729aabf07f3460 Mon Sep 17 00:00:00 2001
|
||||
From: Bernd Kuhls <bernd@kuhls.net>
|
||||
Date: Wed, 17 Jun 2026 20:45:19 +0200
|
||||
Subject: [PATCH] dhcpv6relay: fix build with gcc 9.x
|
||||
|
||||
Fixes various build errors seen with gcc 9.x:
|
||||
|
||||
Making all in dhcpv6relay
|
||||
CC dhcpv6relay_la-dhcpv6relay.lo
|
||||
dhcpv6relay.c: In function 'dhcpv6relay_down':
|
||||
dhcpv6relay.c:193:1: error: parameter name omitted
|
||||
void dhcpv6relay_down(void*, int)
|
||||
^~~~
|
||||
dhcpv6relay.c:193:1: error: parameter name omitted
|
||||
dhcpv6relay.c: In function 'dhcpv6relay_release_route':
|
||||
dhcpv6relay.c:265:45: error: parameter name omitted
|
||||
void dhcpv6relay_release_route(const struct in6_addr* addr, uint8_t prefixlen, uint32_t /* lifetime */)
|
||||
^~~~~~~~
|
||||
dhcpv6relay.c: In function 'dhcpv6relay_process_ia_pd':
|
||||
dhcpv6relay.c:343:2: error: label at end of compound statement
|
||||
default:
|
||||
^~~~~~~
|
||||
dhcpv6relay.c: In function 'dhcpv6relay_process_ia_na':
|
||||
dhcpv6relay.c:380:2: error: label at end of compound statement
|
||||
default:
|
||||
^~~~~~~
|
||||
dhcpv6relay.c: In function 'dhcpv6relay_process_packet_for_routes':
|
||||
dhcpv6relay.c:422:2: error: a label can only be part of a statement and a declaration is not a statement
|
||||
dhcpv6relay_route_func func;
|
||||
^~~~~~~~~~~~~~~~~~~~~~
|
||||
dhcpv6relay.c:449:6: error: label at end of compound statement
|
||||
default:
|
||||
^~~~~~~
|
||||
dhcpv6relay.c: In function 'dhcpv6relay_server_event':
|
||||
dhcpv6relay.c:463:1: error: parameter name omitted
|
||||
void dhcpv6relay_server_event(int fd, void*)
|
||||
^~~~
|
||||
dhcpv6relay.c:558:2: error: label at end of compound statement
|
||||
default:
|
||||
^~~~~~~
|
||||
dhcpv6relay.c: In function 'dhcpv6relay_client_event':
|
||||
dhcpv6relay.c:619:1: error: parameter name omitted
|
||||
void dhcpv6relay_client_event(int fd, void*)
|
||||
^~~~
|
||||
dhcpv6relay.c: In function 'dhcpv6relay_send_router_advertisement_timed':
|
||||
dhcpv6relay.c:795:1: error: parameter name omitted
|
||||
void dhcpv6relay_send_router_advertisement_timed(void*)
|
||||
^~~~
|
||||
dhcpv6relay.c: In function 'dhcpv6relay_router_solicitation':
|
||||
dhcpv6relay.c:802:1: error: parameter name omitted
|
||||
void dhcpv6relay_router_solicitation(int fd, void*)
|
||||
^~~~
|
||||
dhcpv6relay.c: In function 'dhcpv6relay_up':
|
||||
dhcpv6relay.c:855:1: error: parameter name omitted
|
||||
void dhcpv6relay_up(void*, int)
|
||||
^~~~
|
||||
dhcpv6relay.c:855:1: error: parameter name omitted
|
||||
|
||||
Upstream: https://github.com/ppp-project/ppp/pull/598
|
||||
|
||||
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
|
||||
---
|
||||
pppd/plugins/dhcpv6relay/dhcpv6relay.c | 22 ++++++++++++----------
|
||||
1 file changed, 12 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/pppd/plugins/dhcpv6relay/dhcpv6relay.c b/pppd/plugins/dhcpv6relay/dhcpv6relay.c
|
||||
index e9ebba1..e416720 100644
|
||||
--- a/pppd/plugins/dhcpv6relay/dhcpv6relay.c
|
||||
+++ b/pppd/plugins/dhcpv6relay/dhcpv6relay.c
|
||||
@@ -190,7 +190,7 @@ void routes_remove_all()
|
||||
}
|
||||
|
||||
static
|
||||
-void dhcpv6relay_down(void*, int)
|
||||
+void dhcpv6relay_down(__attribute__((unused)) void* unused, __attribute__((unused)) int unusedint)
|
||||
{
|
||||
routes_remove_all();
|
||||
if (dhcpv6relay_sock_ll >= 0) {
|
||||
@@ -262,7 +262,7 @@ void dhcpv6relay_route_timeout(void* _r)
|
||||
}
|
||||
|
||||
static
|
||||
-void dhcpv6relay_release_route(const struct in6_addr* addr, uint8_t prefixlen, uint32_t /* lifetime */)
|
||||
+void dhcpv6relay_release_route(const struct in6_addr* addr, uint8_t prefixlen, __attribute__((unused)) uint32_t lifetime)
|
||||
{
|
||||
char in6addr[INET6_ADDRSTRLEN];
|
||||
|
||||
@@ -341,7 +341,7 @@ void dhcpv6relay_process_ia_pd(const unsigned char *bfr, uint16_t len, dhcpv6rel
|
||||
routefunc((const struct in6_addr*)(bfr + 9), bfr[8], ntohl(*(const uint32_t*)(bfr+4)));
|
||||
break;
|
||||
default:
|
||||
- /* nothing */
|
||||
+ break;
|
||||
}
|
||||
|
||||
bfr += optlen;
|
||||
@@ -378,7 +378,7 @@ void dhcpv6relay_process_ia_na(const unsigned char *bfr, uint16_t len, dhcpv6rel
|
||||
routefunc((const struct in6_addr*)bfr, 128, ntohl(*(const uint32_t*)(bfr+20)));
|
||||
break;
|
||||
default:
|
||||
- /* nothing */
|
||||
+ break;
|
||||
}
|
||||
|
||||
bfr += optlen;
|
||||
@@ -392,6 +392,7 @@ void dhcpv6relay_process_packet_for_routes(const unsigned char *bfr, uint16_t le
|
||||
if (len < 1)
|
||||
return;
|
||||
uint8_t pkttype = *bfr;
|
||||
+ dhcpv6relay_route_func func;
|
||||
|
||||
switch (pkttype) {
|
||||
case DHCPv6_MSGTYPE_RELAY_FORW:
|
||||
@@ -419,7 +420,6 @@ void dhcpv6relay_process_packet_for_routes(const unsigned char *bfr, uint16_t le
|
||||
break;
|
||||
case DHCPv6_MSGTYPE_REPLY:
|
||||
case DHCPv6_MSGTYPE_RELEASE:
|
||||
- dhcpv6relay_route_func func;
|
||||
if (pkttype == DHCPv6_MSGTYPE_RELEASE)
|
||||
func = dhcpv6relay_release_route;
|
||||
else
|
||||
@@ -447,6 +447,7 @@ void dhcpv6relay_process_packet_for_routes(const unsigned char *bfr, uint16_t le
|
||||
dhcpv6relay_process_ia_na(bfr, optlen, func);
|
||||
break;
|
||||
default:
|
||||
+ break;
|
||||
}
|
||||
bfr += optlen;
|
||||
|
||||
@@ -460,7 +461,7 @@ void dhcpv6relay_process_packet_for_routes(const unsigned char *bfr, uint16_t le
|
||||
}
|
||||
|
||||
static
|
||||
-void dhcpv6relay_server_event(int fd, void*)
|
||||
+void dhcpv6relay_server_event(int fd, __attribute__((unused)) void* unused)
|
||||
{
|
||||
unsigned char buffer[1024];
|
||||
unsigned char *options = buffer + 34; /* skip fixed header */
|
||||
@@ -558,6 +559,7 @@ void dhcpv6relay_server_event(int fd, void*)
|
||||
default:
|
||||
/* notice("DHCPv6 relay: Skipping processing of option %u of length %u.",
|
||||
type, len); */
|
||||
+ break;
|
||||
}
|
||||
options += len;
|
||||
r -= len;
|
||||
@@ -616,7 +618,7 @@ int dhcpv6relay_init_upstream()
|
||||
}
|
||||
|
||||
static
|
||||
-void dhcpv6relay_client_event(int fd, void*)
|
||||
+void dhcpv6relay_client_event(int fd, __attribute__((unused)) void* unused)
|
||||
{
|
||||
unsigned char buffer[1024];
|
||||
unsigned char fwd_head[256];
|
||||
@@ -792,14 +794,14 @@ void dhcpv6relay_send_router_advertisement(const struct sockaddr* da)
|
||||
}
|
||||
|
||||
static
|
||||
-void dhcpv6relay_send_router_advertisement_timed(void*)
|
||||
+void dhcpv6relay_send_router_advertisement_timed(__attribute__((unused)) void* unused)
|
||||
{
|
||||
dhcpv6relay_send_router_advertisement(NULL);
|
||||
ppp_timeout(dhcpv6relay_send_router_advertisement_timed, NULL, dhcpv6relay_ra_interval, 0);
|
||||
}
|
||||
|
||||
static
|
||||
-void dhcpv6relay_router_solicitation(int fd, void*)
|
||||
+void dhcpv6relay_router_solicitation(int fd, __attribute__((unused)) void* unused)
|
||||
{
|
||||
unsigned char bfr[1]; /* kernel will truncate packets in case of overflow,
|
||||
and we don't care about the content. Will
|
||||
@@ -852,7 +854,7 @@ int dhcpv6relay_populate_ll(struct sockaddr_in6* res)
|
||||
}
|
||||
|
||||
static
|
||||
-void dhcpv6relay_up(void*, int)
|
||||
+void dhcpv6relay_up(__attribute__((unused)) void* unused, __attribute__((unused)) int unusedint)
|
||||
{
|
||||
struct sockaddr_in6 sa;
|
||||
struct ipv6_mreq mreq;
|
||||
--
|
||||
2.47.3
|
||||
|
||||
32
package/pppd/Config.in
Normal file
32
package/pppd/Config.in
Normal file
@@ -0,0 +1,32 @@
|
||||
config BR2_PACKAGE_PPPD
|
||||
bool "pppd"
|
||||
depends on !BR2_STATIC_LIBS
|
||||
depends on BR2_USE_MMU
|
||||
select BR2_PACKAGE_OPENSSL if BR2_TOOLCHAIN_USES_GLIBC
|
||||
select BR2_PACKAGE_LIBOPENSSL_ENABLE_DES if BR2_PACKAGE_LIBOPENSSL
|
||||
help
|
||||
An implementation of the Point-to-point protocol.
|
||||
|
||||
http://www.samba.org/ppp/
|
||||
|
||||
if BR2_PACKAGE_PPPD
|
||||
|
||||
config BR2_PACKAGE_PPPD_CBCP
|
||||
bool "CBCP (Callback Control Protocol)"
|
||||
help
|
||||
Enable Callback Control Protocol (CBCP) support in pppd.
|
||||
https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cbcp/.
|
||||
|
||||
config BR2_PACKAGE_PPPD_FILTER
|
||||
bool "filtering"
|
||||
select BR2_PACKAGE_LIBPCAP
|
||||
help
|
||||
Packet filtering abilities for pppd. If enabled,
|
||||
the pppd active-filter and pass-filter options
|
||||
are available.
|
||||
|
||||
endif
|
||||
|
||||
comment "pppd needs a toolchain w/ dynamic library"
|
||||
depends on BR2_STATIC_LIBS
|
||||
depends on BR2_USE_MMU
|
||||
4
package/pppd/pppd.hash
Normal file
4
package/pppd/pppd.hash
Normal file
@@ -0,0 +1,4 @@
|
||||
# Locally calculated
|
||||
sha256 ddda28dec8aca99a403ab6070d94ffd2b17d63e9a4c5509158e99e148f572d4f ppp-2.5.3.tar.gz
|
||||
sha256 5d588eb3b157d52112afea935c88a7ff9efddc1e2d95a42c25d3b96ad9055008 LICENSE.BSD
|
||||
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 LICENSE.GPL-2
|
||||
60
package/pppd/pppd.mk
Normal file
60
package/pppd/pppd.mk
Normal file
@@ -0,0 +1,60 @@
|
||||
################################################################################
|
||||
#
|
||||
# pppd
|
||||
#
|
||||
################################################################################
|
||||
|
||||
PPPD_VERSION = 2.5.3
|
||||
PPPD_SITE = https://download.samba.org/pub/ppp
|
||||
PPPD_SOURCE = ppp-$(PPPD_VERSION).tar.gz
|
||||
PPPD_LICENSE = LGPL-2.0+, LGPL, BSD-4-Clause, BSD-3-Clause, GPL-2.0+
|
||||
PPPD_LICENSE_FILES = LICENSE.BSD LICENSE.GPL-2
|
||||
PPPD_CPE_ID_VENDOR = point-to-point_protocol_project
|
||||
PPPD_CPE_ID_PRODUCT = point-to-point_protocol
|
||||
PPPD_SELINUX_MODULES = ppp
|
||||
PPPD_INSTALL_STAGING = YES
|
||||
PPPD_CONF_OPTS = --enable-multilink
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
|
||||
PPPD_CONF_OPTS += --with-pam=$(STAGING_DIR)/usr
|
||||
PPPD_DEPENDENCIES += linux-pam
|
||||
else
|
||||
PPPD_CONF_OPTS += --without-pam
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
||||
PPPD_CONF_OPTS += \
|
||||
--enable-eaptls \
|
||||
--enable-openssl-engine \
|
||||
--enable-peap \
|
||||
--with-openssl=$(STAGING_DIR)/usr
|
||||
PPPD_DEPENDENCIES += openssl
|
||||
else
|
||||
PPPD_CONF_OPTS += \
|
||||
--disable-eaptls \
|
||||
--disable-openssl-engine \
|
||||
--disable-peap \
|
||||
--without-openssl
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PPPD_CBCP),y)
|
||||
PPPD_CONF_OPTS += --enable-cbcp
|
||||
else
|
||||
PPPD_CONF_OPTS += --disable-cbcp
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PPPD_FILTER),y)
|
||||
PPPD_CONF_OPTS += --with-pcap=$(STAGING_DIR)/usr
|
||||
PPPD_DEPENDENCIES += libpcap
|
||||
else
|
||||
PPPD_CONF_OPTS += --without-pcap
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD),y)
|
||||
PPPD_CONF_OPTS += --enable-systemd
|
||||
PPPD_DEPENDENCIES += systemd
|
||||
else
|
||||
PPPD_CONF_OPTS += --disable-systemd
|
||||
endif
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user