summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-networking/recipes-daemons/ippool/ippool/0001-pppd-ippool.c-Fix-type-casting-issues-between-in_add.patch72
-rw-r--r--meta-networking/recipes-daemons/ippool/ippool/0002-ippool_rpc_server.c-Add-missing-prototype-for-ippool.patch22
-rw-r--r--meta-networking/recipes-daemons/ippool/ippool_1.3.bb2
3 files changed, 96 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/ippool/ippool/0001-pppd-ippool.c-Fix-type-casting-issues-between-in_add.patch b/meta-networking/recipes-daemons/ippool/ippool/0001-pppd-ippool.c-Fix-type-casting-issues-between-in_add.patch
new file mode 100644
index 0000000000..a98c179290
--- /dev/null
+++ b/meta-networking/recipes-daemons/ippool/ippool/0001-pppd-ippool.c-Fix-type-casting-issues-between-in_add.patch
@@ -0,0 +1,72 @@
1From da67444994bde603c7ff1483a6803bdab24e1f14 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 29 Aug 2022 09:36:55 -0700
4Subject: [PATCH 1/2] pppd/ippool.c: Fix type casting issues between in_addr
5 and ippool_api_ip_addr
6
7Also remove unused variabled
8
9Upstream-Status: Inappropriate [No upstream]
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 pppd/ippool.c | 13 ++++++-------
13 1 file changed, 6 insertions(+), 7 deletions(-)
14
15--- a/pppd/ippool.c
16+++ b/pppd/ippool.c
17@@ -16,6 +16,7 @@
18 #include <sys/ioctl.h>
19 #include <sys/socket.h>
20 #include <netinet/in.h>
21+#include <arpa/inet.h>
22 #include <signal.h>
23
24 #include <linux/types.h>
25@@ -24,7 +25,6 @@
26
27 const char pppd_version[] = VERSION;
28
29-static int ippool_fd = -1;
30 static char *ippool_pool_name = NULL;
31 static char *ippool_pool_name2 = NULL;
32 static char *ippool_server = "localhost";
33@@ -64,9 +64,9 @@ static int ippool_addr_alloc(CLIENT *cl,
34 }
35
36 *addr = clnt_res.addr.s_addr;
37-
38+ struct in_addr temp_addr = {*addr};
39 if (ippool_debug) {
40- dbglog("Allocated address %s from pool %s", inet_ntoa(clnt_res.addr.s_addr), pool_name);
41+ dbglog("Allocated address %s from pool %s", inet_ntoa(temp_addr), pool_name);
42 }
43 out:
44 return result;
45@@ -85,14 +85,16 @@ static void ippool_addr_free(CLIENT *cl,
46 }
47 if (clnt_res < 0) {
48 if (ippool_debug) {
49+ struct in_addr temp_addr = {free_addr.s_addr};
50 warn("IP address %s free to pool %s failed: %s",
51- inet_ntoa(free_addr), pool_name, strerror(-clnt_res));
52+ inet_ntoa(temp_addr), pool_name, strerror(-clnt_res));
53 }
54 goto out;
55 }
56
57 if (ippool_debug) {
58- dbglog("Freed address %s to pool %s", inet_ntoa(free_addr), pool_name);
59+ struct in_addr temp_addr = {free_addr.s_addr};
60+ dbglog("Freed address %s to pool %s", inet_ntoa(temp_addr), pool_name);
61 }
62 out:
63 return;
64@@ -138,8 +140,6 @@ static void ippool_choose_ip(u_int32_t *
65 {
66 ipcp_options *wo = &ipcp_wantoptions[0];
67 ipcp_options *go = &ipcp_gotoptions[0];
68- ipcp_options *ao = &ipcp_allowoptions[0];
69- ipcp_options *ho = &ipcp_hisoptions[0];
70 CLIENT *cl;
71 int result = 0;
72
diff --git a/meta-networking/recipes-daemons/ippool/ippool/0002-ippool_rpc_server.c-Add-missing-prototype-for-ippool.patch b/meta-networking/recipes-daemons/ippool/ippool/0002-ippool_rpc_server.c-Add-missing-prototype-for-ippool.patch
new file mode 100644
index 0000000000..b8fdedf0c8
--- /dev/null
+++ b/meta-networking/recipes-daemons/ippool/ippool/0002-ippool_rpc_server.c-Add-missing-prototype-for-ippool.patch
@@ -0,0 +1,22 @@
1From f9ea91771f0d3c984e7d5fe9e15962db1ee686ad Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 29 Aug 2022 09:39:16 -0700
4Subject: [PATCH 2/2] ippool_rpc_server.c: Add missing prototype for
5 ippool_api_rpc_check_request
6
7Upstream-Status: Inappropriate [no upstream]
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10 ippool_rpc_server.c | 2 ++
11 1 file changed, 2 insertions(+)
12
13--- a/Makefile
14+++ b/Makefile
15@@ -123,6 +123,7 @@ $(IPPOOL_RPC_STEM)_server.c: $(IPPOOL_RP
16 -$(RM) $@ $@.tmp
17 rpcgen $(RPCGENFLAGS) -m -o $@.tmp $<
18 cat $@.tmp | sed -e 's/switch (rqstp->rq_proc) {/if (ippool_api_rpc_check_request(transp) < 0) return; switch (rqstp->rq_proc) {/' > $@
19+ sed -i '20i int ippool_api_rpc_check_request(SVCXPRT *xprt);' $@
20
21 $(IPPOOL_RPC_STEM)_client.c: $(IPPOOL_RPC_STEM).x
22 -$(RM) $@
diff --git a/meta-networking/recipes-daemons/ippool/ippool_1.3.bb b/meta-networking/recipes-daemons/ippool/ippool_1.3.bb
index b91ca53682..984acac76e 100644
--- a/meta-networking/recipes-daemons/ippool/ippool_1.3.bb
+++ b/meta-networking/recipes-daemons/ippool/ippool_1.3.bb
@@ -27,6 +27,8 @@ SRC_URI = "https://sourceforge.net/projects/openl2tp/files/${BPN}/${PV}/${BPN}-$
27 file://0002-link-with-libtirpc.patch \ 27 file://0002-link-with-libtirpc.patch \
28 file://0003-musl-fixes.patch \ 28 file://0003-musl-fixes.patch \
29 file://strncpy-truncation.patch \ 29 file://strncpy-truncation.patch \
30 file://0001-pppd-ippool.c-Fix-type-casting-issues-between-in_add.patch \
31 file://0002-ippool_rpc_server.c-Add-missing-prototype-for-ippool.patch \
30 " 32 "
31 33
32LIC_FILES_CHKSUM = "file://LICENSE;md5=4c59283b82fc2b166455e0fc23c71c6f" 34LIC_FILES_CHKSUM = "file://LICENSE;md5=4c59283b82fc2b166455e0fc23c71c6f"