summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-networking/recipes-daemons/ippool/ippool/0003-musl-fixes.patch231
-rw-r--r--meta-networking/recipes-daemons/ippool/ippool_1.3.bb8
2 files changed, 16 insertions, 223 deletions
diff --git a/meta-networking/recipes-daemons/ippool/ippool/0003-musl-fixes.patch b/meta-networking/recipes-daemons/ippool/ippool/0003-musl-fixes.patch
index 3cd5259fa..952e4f0d0 100644
--- a/meta-networking/recipes-daemons/ippool/ippool/0003-musl-fixes.patch
+++ b/meta-networking/recipes-daemons/ippool/ippool/0003-musl-fixes.patch
@@ -12,10 +12,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
12 4 files changed, 208 insertions(+), 6 deletions(-) 12 4 files changed, 208 insertions(+), 6 deletions(-)
13 create mode 100644 net/ppp_defs.h 13 create mode 100644 net/ppp_defs.h
14 14
15diff --git a/cli/cli_readline.c b/cli/cli_readline.c 15Index: ippool-1.3/cli/cli_readline.c
16index 2812e6e..542935c 100644 16===================================================================
17--- a/cli/cli_readline.c 17--- ippool-1.3.orig/cli/cli_readline.c
18+++ b/cli/cli_readline.c 18+++ ippool-1.3/cli/cli_readline.c
19@@ -17,13 +17,14 @@ 19@@ -17,13 +17,14 @@
20 * Boston, MA 02110-1301 USA 20 * Boston, MA 02110-1301 USA
21 * 21 *
@@ -33,7 +33,7 @@ index 2812e6e..542935c 100644
33 #include <signal.h> 33 #include <signal.h>
34 34
35 #include <readline/readline.h> 35 #include <readline/readline.h>
36@@ -630,7 +631,7 @@ static void cli_rl_uninstall_signal_handlers(void) 36@@ -630,7 +631,7 @@ static void cli_rl_uninstall_signal_hand
37 37
38 static int cli_rl_install_signal_handlers(void) 38 static int cli_rl_install_signal_handlers(void)
39 { 39 {
@@ -42,11 +42,11 @@ index 2812e6e..542935c 100644
42 42
43 rl_catch_signals = 0; 43 rl_catch_signals = 0;
44 rl_clear_signals(); 44 rl_clear_signals();
45diff --git a/ippool_api.c b/ippool_api.c 45Index: ippool-1.3/ippool_api.c
46index 2c10c47..d1127a9 100644 46===================================================================
47--- a/ippool_api.c 47--- ippool-1.3.orig/ippool_api.c
48+++ b/ippool_api.c 48+++ ippool-1.3/ippool_api.c
49@@ -181,10 +181,13 @@ int ippool_api_rpc_check_request(SVCXPRT *xprt) 49@@ -181,10 +181,13 @@ int ippool_api_rpc_check_request(SVCXPRT
50 * non-loopback interface, reject the request. 50 * non-loopback interface, reject the request.
51 */ 51 */
52 if ((!ippool_opt_remote_rpc) && 52 if ((!ippool_opt_remote_rpc) &&
@@ -63,210 +63,10 @@ index 2c10c47..d1127a9 100644
63 } 63 }
64 svcerr_auth(xprt, AUTH_TOOWEAK); 64 svcerr_auth(xprt, AUTH_TOOWEAK);
65 return -EPERM; 65 return -EPERM;
66diff --git a/net/ppp_defs.h b/net/ppp_defs.h 66Index: ippool-1.3/usl/usl.h
67new file mode 100644 67===================================================================
68index 0000000..b06eda5 68--- ippool-1.3.orig/usl/usl.h
69--- /dev/null 69+++ ippool-1.3/usl/usl.h
70+++ b/net/ppp_defs.h
71@@ -0,0 +1,194 @@
72+/* $Id: ppp_defs.h,v 1.17 2002/12/06 09:49:15 paulus Exp $ */
73+
74+/*
75+ * ppp_defs.h - PPP definitions.
76+ *
77+ * Copyright (c) 1984 Paul Mackerras. All rights reserved.
78+ *
79+ * Redistribution and use in source and binary forms, with or without
80+ * modification, are permitted provided that the following conditions
81+ * are met:
82+ *
83+ * 1. Redistributions of source code must retain the above copyright
84+ * notice, this list of conditions and the following disclaimer.
85+ *
86+ * 2. Redistributions in binary form must reproduce the above copyright
87+ * notice, this list of conditions and the following disclaimer in
88+ * the documentation and/or other materials provided with the
89+ * distribution.
90+ *
91+ * 3. The name(s) of the authors of this software must not be used to
92+ * endorse or promote products derived from this software without
93+ * prior written permission.
94+ *
95+ * 4. Redistributions of any form whatsoever must retain the following
96+ * acknowledgment:
97+ * "This product includes software developed by Paul Mackerras
98+ * <paulus@samba.org>".
99+ *
100+ * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO
101+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
102+ * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
103+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
104+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
105+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
106+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
107+ */
108+
109+#ifndef _PPP_DEFS_H_
110+#define _PPP_DEFS_H_
111+
112+/*
113+ * The basic PPP frame.
114+ */
115+#define PPP_HDRLEN 4 /* octets for standard ppp header */
116+#define PPP_FCSLEN 2 /* octets for FCS */
117+
118+/*
119+ * Packet sizes
120+ *
121+ * Note - lcp shouldn't be allowed to negotiate stuff outside these
122+ * limits. See lcp.h in the pppd directory.
123+ * (XXX - these constants should simply be shared by lcp.c instead
124+ * of living in lcp.h)
125+ */
126+#define PPP_MTU 1500 /* Default MTU (size of Info field) */
127+#define PPP_MAXMTU 65535 - (PPP_HDRLEN + PPP_FCSLEN)
128+#define PPP_MINMTU 64
129+#define PPP_MRU 1500 /* default MRU = max length of info field */
130+#define PPP_MAXMRU 65000 /* Largest MRU we allow */
131+#define PPP_MINMRU 128
132+
133+#define PPP_ADDRESS(p) (((u_char *)(p))[0])
134+#define PPP_CONTROL(p) (((u_char *)(p))[1])
135+#define PPP_PROTOCOL(p) ((((u_char *)(p))[2] << 8) + ((u_char *)(p))[3])
136+
137+/*
138+ * Significant octet values.
139+ */
140+#define PPP_ALLSTATIONS 0xff /* All-Stations broadcast address */
141+#define PPP_UI 0x03 /* Unnumbered Information */
142+#define PPP_FLAG 0x7e /* Flag Sequence */
143+#define PPP_ESCAPE 0x7d /* Asynchronous Control Escape */
144+#define PPP_TRANS 0x20 /* Asynchronous transparency modifier */
145+
146+/*
147+ * Protocol field values.
148+ */
149+#define PPP_IP 0x21 /* Internet Protocol */
150+#define PPP_AT 0x29 /* AppleTalk Protocol */
151+#define PPP_IPX 0x2b /* IPX protocol */
152+#define PPP_VJC_COMP 0x2d /* VJ compressed TCP */
153+#define PPP_VJC_UNCOMP 0x2f /* VJ uncompressed TCP */
154+#define PPP_IPV6 0x57 /* Internet Protocol Version 6 */
155+#define PPP_COMP 0xfd /* compressed packet */
156+#define PPP_IPCP 0x8021 /* IP Control Protocol */
157+#define PPP_ATCP 0x8029 /* AppleTalk Control Protocol */
158+#define PPP_IPXCP 0x802b /* IPX Control Protocol */
159+#define PPP_IPV6CP 0x8057 /* IPv6 Control Protocol */
160+#define PPP_CCP 0x80fd /* Compression Control Protocol */
161+#define PPP_ECP 0x8053 /* Encryption Control Protocol */
162+#define PPP_LCP 0xc021 /* Link Control Protocol */
163+#define PPP_PAP 0xc023 /* Password Authentication Protocol */
164+#define PPP_LQR 0xc025 /* Link Quality Report protocol */
165+#define PPP_CHAP 0xc223 /* Cryptographic Handshake Auth. Protocol */
166+#define PPP_CBCP 0xc029 /* Callback Control Protocol */
167+#define PPP_EAP 0xc227 /* Extensible Authentication Protocol */
168+
169+/*
170+ * Values for FCS calculations.
171+ */
172+#define PPP_INITFCS 0xffff /* Initial FCS value */
173+#define PPP_GOODFCS 0xf0b8 /* Good final FCS value */
174+#define PPP_FCS(fcs, c) (((fcs) >> 8) ^ fcstab[((fcs) ^ (c)) & 0xff])
175+
176+/*
177+ * A 32-bit unsigned integral type.
178+ */
179+
180+#if !defined(__BIT_TYPES_DEFINED__) && !defined(_BITYPES) \
181+ && !defined(__FreeBSD__) && (NS_TARGET < 40)
182+#ifdef UINT32_T
183+typedef UINT32_T u_int32_t;
184+#else
185+typedef unsigned int u_int32_t;
186+typedef unsigned short u_int16_t;
187+#endif
188+#endif
189+
190+/*
191+ * Extended asyncmap - allows any character to be escaped.
192+ */
193+typedef u_int32_t ext_accm[8];
194+
195+/*
196+ * What to do with network protocol (NP) packets.
197+ */
198+enum NPmode {
199+ NPMODE_PASS, /* pass the packet through */
200+ NPMODE_DROP, /* silently drop the packet */
201+ NPMODE_ERROR, /* return an error */
202+ NPMODE_QUEUE /* save it up for later. */
203+};
204+
205+/*
206+ * Statistics.
207+ */
208+struct pppstat {
209+ unsigned int ppp_ibytes; /* bytes received */
210+ unsigned int ppp_ipackets; /* packets received */
211+ unsigned int ppp_ierrors; /* receive errors */
212+ unsigned int ppp_obytes; /* bytes sent */
213+ unsigned int ppp_opackets; /* packets sent */
214+ unsigned int ppp_oerrors; /* transmit errors */
215+};
216+
217+struct vjstat {
218+ unsigned int vjs_packets; /* outbound packets */
219+ unsigned int vjs_compressed; /* outbound compressed packets */
220+ unsigned int vjs_searches; /* searches for connection state */
221+ unsigned int vjs_misses; /* times couldn't find conn. state */
222+ unsigned int vjs_uncompressedin; /* inbound uncompressed packets */
223+ unsigned int vjs_compressedin; /* inbound compressed packets */
224+ unsigned int vjs_errorin; /* inbound unknown type packets */
225+ unsigned int vjs_tossed; /* inbound packets tossed because of error */
226+};
227+
228+struct ppp_stats {
229+ struct pppstat p; /* basic PPP statistics */
230+ struct vjstat vj; /* VJ header compression statistics */
231+};
232+
233+struct compstat {
234+ unsigned int unc_bytes; /* total uncompressed bytes */
235+ unsigned int unc_packets; /* total uncompressed packets */
236+ unsigned int comp_bytes; /* compressed bytes */
237+ unsigned int comp_packets; /* compressed packets */
238+ unsigned int inc_bytes; /* incompressible bytes */
239+ unsigned int inc_packets; /* incompressible packets */
240+ unsigned int ratio; /* recent compression ratio << 8 */
241+};
242+
243+struct ppp_comp_stats {
244+ struct compstat c; /* packet compression statistics */
245+ struct compstat d; /* packet decompression statistics */
246+};
247+
248+/*
249+ * The following structure records the time in seconds since
250+ * the last NP packet was sent or received.
251+ */
252+struct ppp_idle {
253+ time_t xmit_idle; /* time since last NP packet sent */
254+ time_t recv_idle; /* time since last NP packet received */
255+};
256+
257+#ifndef __P
258+#ifdef __STDC__
259+#define __P(x) x
260+#else
261+#define __P(x) ()
262+#endif
263+#endif
264+
265+#endif /* _PPP_DEFS_H_ */
266diff --git a/usl/usl.h b/usl/usl.h
267index cdc16db..88d2714 100644
268--- a/usl/usl.h
269+++ b/usl/usl.h
270@@ -38,6 +38,10 @@ 70@@ -38,6 +38,10 @@
271 #include "usl_fsm.h" 71 #include "usl_fsm.h"
272 #include "usl_list.h" 72 #include "usl_list.h"
@@ -278,6 +78,3 @@ index cdc16db..88d2714 100644
278 #define USL_VERSION "0.6" 78 #define USL_VERSION "0.6"
279 79
280 #ifdef DEBUG 80 #ifdef DEBUG
281--
2822.13.3
283
diff --git a/meta-networking/recipes-daemons/ippool/ippool_1.3.bb b/meta-networking/recipes-daemons/ippool/ippool_1.3.bb
index 6e4748357..6fa46904b 100644
--- a/meta-networking/recipes-daemons/ippool/ippool_1.3.bb
+++ b/meta-networking/recipes-daemons/ippool/ippool_1.3.bb
@@ -24,8 +24,6 @@ SRC_URI = "https://sourceforge.net/projects/openl2tp/files/${BPN}/${PV}/${BPN}-$
24 file://0001-read-returns-ssize_t.patch \ 24 file://0001-read-returns-ssize_t.patch \
25 file://0002-Mark-first-element-of-a-string-as-null.patch \ 25 file://0002-Mark-first-element-of-a-string-as-null.patch \
26 file://0003-cli-Mark-return-of-strtol-as-long-int.patch \ 26 file://0003-cli-Mark-return-of-strtol-as-long-int.patch \
27 "
28SRC_URI_append_libc-musl = "\
29 file://0002-link-with-libtirpc.patch \ 27 file://0002-link-with-libtirpc.patch \
30 file://0003-musl-fixes.patch \ 28 file://0003-musl-fixes.patch \
31 " 29 "
@@ -36,8 +34,7 @@ SRC_URI[sha256sum] = "d3eab7d6cad5da8ccc9d1e31d5303e27a39622c07bdb8fa3618eea3144
36 34
37inherit systemd 35inherit systemd
38 36
39DEPENDS = "readline ppp ncurses gzip-native" 37DEPENDS = "readline ppp ncurses gzip-native rpcsvc-proto-native libtirpc"
40DEPENDS_append_libc-musl = " libtirpc"
41RDEPENDS_${PN} = "rpcbind" 38RDEPENDS_${PN} = "rpcbind"
42 39
43EXTRA_OEMAKE = "CC='${CC}' AS='${AS}' LD='${LD}' AR='${AR}' NM='${NM}' STRIP='${STRIP}'" 40EXTRA_OEMAKE = "CC='${CC}' AS='${AS}' LD='${LD}' AR='${AR}' NM='${NM}' STRIP='${STRIP}'"
@@ -45,8 +42,7 @@ EXTRA_OEMAKE += "PPPD_VERSION=${PPPD_VERSION} SYS_LIBDIR=${libdir}"
45# enable self tests 42# enable self tests
46EXTRA_OEMAKE += "IPPOOL_TEST=y" 43EXTRA_OEMAKE += "IPPOOL_TEST=y"
47 44
48CPPFLAGS += "${SELECTED_OPTIMIZATION}" 45CPPFLAGS += "${SELECTED_OPTIMIZATION} -I${STAGING_INCDIR}/tirpc"
49CPPFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc"
50 46
51SYSTEMD_SERVICE_${PN} = "ippool.service" 47SYSTEMD_SERVICE_${PN} = "ippool.service"
52SYSTEMD_AUTO_ENABLE = "disable" 48SYSTEMD_AUTO_ENABLE = "disable"