summaryrefslogtreecommitdiffstatsabout
path: root/SylixOS
diff options
context:
space:
mode:
authorHanhui <hanhui@acoinfo.com>2020-12-23 11:16:01 (GMT)
committer Hanhui <hanhui@acoinfo.com>2020-12-23 11:16:01 (GMT)
commitda3d7854ee7020bd859b149db5d92f02ad6ec2d2 (patch)
tree1b351cb933b280db3fe183948932c26599d5d4d0 /SylixOS
parent1cab5fd8469433075c9bb29fc86d2044e2b972ee (diff)
downloadlibsylixos-da3d7854ee7020bd859b149db5d92f02ad6ec2d2.zip
libsylixos-da3d7854ee7020bd859b149db5d92f02ad6ec2d2.tar.gz
libsylixos-da3d7854ee7020bd859b149db5d92f02ad6ec2d2.tar.bz2
TCP support RFC6528 and add optimized memory copy function for C-SKY.
Diffstat (limited to 'SylixOS')
-rw-r--r--SylixOS/CHANGELOG3
-rw-r--r--SylixOS/arch/arm64/common/arm64Exc.c10
-rw-r--r--SylixOS/arch/csky/csky_support.h6
-rw-r--r--SylixOS/lib/libc/string/lib_memcpy.c1
-rw-r--r--SylixOS/lib/libc/string/lib_memset.c1
-rw-r--r--SylixOS/mktemp/libsylixos.mk2
-rw-r--r--SylixOS/net/lwip/lwip_config.h10
-rw-r--r--SylixOS/net/lwip/lwip_fix.c9
-rw-r--r--SylixOS/net/lwip/lwip_hook.h3
-rw-r--r--SylixOS/net/lwip/src/core/ipv4/ip4_frag.c4
-rw-r--r--SylixOS/net/lwip/src/core/ipv6/ip6_frag.c4
-rw-r--r--SylixOS/net/lwip/src/core/tcp.c9
-rw-r--r--SylixOS/net/lwip/tcpext/tcp_isn.c176
-rw-r--r--SylixOS/net/lwip/tcpext/tcp_isn.h48
-rw-r--r--SylixOS/net/lwip/tcpext/tcp_md5.c (renamed from SylixOS/net/lwip/tcpsig/tcp_md5.c)0
-rw-r--r--SylixOS/net/lwip/tcpext/tcp_md5.h (renamed from SylixOS/net/lwip/tcpsig/tcp_md5.h)0
16 files changed, 281 insertions, 5 deletions
diff --git a/SylixOS/CHANGELOG b/SylixOS/CHANGELOG
index e568248..15804b7 100644
--- a/SylixOS/CHANGELOG
+++ b/SylixOS/CHANGELOG
@@ -4,6 +4,9 @@ HISTORY
++ New features:
+ 2020-12-23: han.hui
+ 加入 RFC6528 安全标准支持.
+
2020-10-04: han.hui
加入 sys/random.h 支持.
diff --git a/SylixOS/arch/arm64/common/arm64Exc.c b/SylixOS/arch/arm64/common/arm64Exc.c
index d50162b..bfc8839 100644
--- a/SylixOS/arch/arm64/common/arm64Exc.c
+++ b/SylixOS/arch/arm64/common/arm64Exc.c
@@ -170,6 +170,10 @@ VOID archSyncExcHandle (ARCH_REG_CTX *pregctx, UINT32 uiExcType)
switch (uiExcClass) {
case EXC_UNKNOWN_REASON:
+ abtInfo.VMABT_uiMethod = LW_VMM_ABORT_METHOD_EXEC;
+ abtInfo.VMABT_uiType = LW_VMM_ABORT_TYPE_UNDEF; /* 指令错误 */
+ break;
+
case EXC_TRAP_WFI_WFE:
case EXC_EL3:
abtInfo.VMABT_uiMethod = 0;
@@ -225,6 +229,12 @@ VOID archSyncExcHandle (ARCH_REG_CTX *pregctx, UINT32 uiExcType)
case EXC_DATA_ABORT_LO:
case EXC_DATA_ABORT:
+ if (uiExcISS == 0x21) {
+ abtInfo.VMABT_uiMethod = LW_VMM_ABORT_METHOD_EXEC;
+ abtInfo.VMABT_uiType = LW_VMM_ABORT_TYPE_BUS; /* 非对齐访问错误 */
+ break;
+ }
+
ulAbortAddr = arm64MmuAbtFaultAddr();
abtInfo.VMABT_uiMethod = (uiExcISS & 0x40) ? LW_VMM_ABORT_METHOD_WRITE : LW_VMM_ABORT_METHOD_READ;
abtInfo.VMABT_uiType = LW_VMM_ABORT_TYPE_MAP; /* 数据错误 */
diff --git a/SylixOS/arch/csky/csky_support.h b/SylixOS/arch/csky/csky_support.h
index 0212b9f..fe13314 100644
--- a/SylixOS/arch/csky/csky_support.h
+++ b/SylixOS/arch/csky/csky_support.h
@@ -42,8 +42,14 @@
*********************************************************************************************************/
#define __ARCH_KERNEL_PARAM archKernelParam
+#define __ARCH_MEMCPY archMemcpy
+#define __ARCH_MEMMOVE archMemmove
+#define __ARCH_MEMSET archMemset
VOID archKernelParam(CPCHAR pcParam);
+PVOID archMemcpy(PVOID pvDest, CPVOID pvSrc, size_t stCount);
+PVOID archMemmove(PVOID pvDest, CPVOID pvSrc, size_t stCount);
+PVOID archMemset(PVOID pvDest, INT iC, size_t stCount);
/*********************************************************************************************************
C-SKY 处理器断言
diff --git a/SylixOS/lib/libc/string/lib_memcpy.c b/SylixOS/lib/libc/string/lib_memcpy.c
index 4a25111..802eb65 100644
--- a/SylixOS/lib/libc/string/lib_memcpy.c
+++ b/SylixOS/lib/libc/string/lib_memcpy.c
@@ -21,6 +21,7 @@
** BUG:
2016.07.15 优化速度.
*********************************************************************************************************/
+#define __SYLIXOS_KERNEL
#include "../SylixOS/kernel/include/k_kernel.h"
/*********************************************************************************************************
按 ULONG 对齐方式拷贝
diff --git a/SylixOS/lib/libc/string/lib_memset.c b/SylixOS/lib/libc/string/lib_memset.c
index 568ef35..f1f4a4c 100644
--- a/SylixOS/lib/libc/string/lib_memset.c
+++ b/SylixOS/lib/libc/string/lib_memset.c
@@ -24,6 +24,7 @@
2016.07.15 优化速度.
2018.12.26 优化程序结构.
*********************************************************************************************************/
+#define __SYLIXOS_KERNEL
#include "../SylixOS/kernel/include/k_kernel.h"
/*********************************************************************************************************
按 ULONG 对齐方式拷贝
diff --git a/SylixOS/mktemp/libsylixos.mk b/SylixOS/mktemp/libsylixos.mk
index 9a6002a..7ff8353 100644
--- a/SylixOS/mktemp/libsylixos.mk
+++ b/SylixOS/mktemp/libsylixos.mk
@@ -126,7 +126,7 @@ else
$(OUTPATH)/symbol.c: $($(target)_A)
@rm -f $@
cp SylixOS/hosttools/makesymbol/Makefile $(OUTDIR)
- cp SylixOS/hosttools/makesymbol/makesymbol.exe $(OUTDIR)
+ cp SylixOS/hosttools/makesymbol/makesymbol.bat $(OUTDIR)
cp SylixOS/hosttools/makesymbol/makesymbol.sh $(OUTDIR)
cp SylixOS/hosttools/makesymbol/nm.exe $(OUTDIR)
make -C $(OUTDIR)
diff --git a/SylixOS/net/lwip/lwip_config.h b/SylixOS/net/lwip/lwip_config.h
index 79ee642..3bc5463 100644
--- a/SylixOS/net/lwip/lwip_config.h
+++ b/SylixOS/net/lwip/lwip_config.h
@@ -111,7 +111,9 @@ extern PVOID lwip_platform_smemcpy(PVOID pvDest, CPVOID pvSrc, size_t stCoun
#define PBUF_POOL_SIZE LW_CFG_LWIP_NUM_POOLS /* pool num */
#define PBUF_POOL_BUFSIZE LW_CFG_LWIP_POOL_SIZE /* pool block size */
-#if MEM_SIZE >= (1 * LW_CFG_MB_SIZE)
+#if MEM_SIZE >= (2 * LW_CFG_MB_SIZE)
+#define MEMP_NUM_REASSDATA 1024
+#elif MEM_SIZE >= (1 * LW_CFG_MB_SIZE)
#define MEMP_NUM_REASSDATA 512 /* 同时进行重组的 IP 数据包 */
#elif MEM_SIZE >= (512 * LW_CFG_KB_SIZE)
#define MEMP_NUM_REASSDATA 256
@@ -742,6 +744,12 @@ extern INT __inetHostTableGetItem(CPCHAR pcHost, size_t stLen, PVOID pvAddr,
#define LWIP_HOOK_FILENAME "network/arch/hook.h" /* hook 声明 */
/*********************************************************************************************************
+ lwip tcp hook
+*********************************************************************************************************/
+
+#define LWIP_HOOK_TCP_ISN tcp_isn_hook
+
+/*********************************************************************************************************
lwip ip route hook
*********************************************************************************************************/
diff --git a/SylixOS/net/lwip/lwip_fix.c b/SylixOS/net/lwip/lwip_fix.c
index f4b4ded..4cfb0f3 100644
--- a/SylixOS/net/lwip/lwip_fix.c
+++ b/SylixOS/net/lwip/lwip_fix.c
@@ -60,6 +60,7 @@
#if LW_CFG_NET_EN > 0
#include "lwip_config.h"
#include "lwip_fix.h"
+#include "lwip_hook.h"
#include "lwip/debug.h"
#include "lwip/def.h"
#include "lwip/sys.h"
@@ -85,6 +86,7 @@
#include "netif/ppp/pppapi.h"
#endif /* PPP_SUPPORT > 0 || */
/* PPPOE_SUPPORT > 0 */
+#include "sys/random.h"
/*********************************************************************************************************
版本判断 (警告!!! 低版本 lwip 系统将不再支持)
*********************************************************************************************************/
@@ -117,8 +119,15 @@ static void sys_thread_sem_fini(LW_OBJECT_HANDLE id);
*********************************************************************************************************/
void sys_init (void)
{
+ u8_t iv[16];
+ time_t now;
+
LW_SPIN_INIT(&_G_slcaLwip.SLCA_sl); /* 初始化网络关键区域自旋锁 */
+ lib_time(&now);
+ getrandom(iv, sizeof(iv), GRND_NONBLOCK);
+ tcp_isn_init(&now, iv); /* 初始化 TCP ISN 生成器 */
+
#if LW_CFG_NET_SAFE > 0
#if LW_CFG_NET_SAFE_LAZY == 0
API_SystemHookAdd(sys_thread_sem_init, LW_OPTION_THREAD_CREATE_HOOK);
diff --git a/SylixOS/net/lwip/lwip_hook.h b/SylixOS/net/lwip/lwip_hook.h
index 20ff4ec..42ade7a 100644
--- a/SylixOS/net/lwip/lwip_hook.h
+++ b/SylixOS/net/lwip/lwip_hook.h
@@ -29,8 +29,9 @@
*********************************************************************************************************/
#if LW_CFG_LWIP_TCP_SIG_EN > 0
-#include "tcpsig/tcp_md5.h"
+#include "tcpext/tcp_md5.h"
#endif
+#include "tcpext/tcp_isn.h"
#if LW_CFG_NET_MROUTER > 0
#include "netinet/in.h"
#include "netinet/ip_mroute.h"
diff --git a/SylixOS/net/lwip/src/core/ipv4/ip4_frag.c b/SylixOS/net/lwip/src/core/ipv4/ip4_frag.c
index b3243c4..9b57f46 100644
--- a/SylixOS/net/lwip/src/core/ipv4/ip4_frag.c
+++ b/SylixOS/net/lwip/src/core/ipv4/ip4_frag.c
@@ -525,7 +525,11 @@ ip4_reass(struct pbuf *p)
offset = IPH_OFFSET_BYTES(fraghdr);
len = lwip_ntohs(IPH_LEN(fraghdr));
hlen = IPH_HL_BYTES(fraghdr);
+#ifdef SYLIXOS /* SylixOS Reject 0-length fragments */
+ if (hlen >= len) {
+#else
if (hlen > len) {
+#endif
/* invalid datagram */
goto nullreturn;
}
diff --git a/SylixOS/net/lwip/src/core/ipv6/ip6_frag.c b/SylixOS/net/lwip/src/core/ipv6/ip6_frag.c
index 6617e0d..d23254d 100644
--- a/SylixOS/net/lwip/src/core/ipv6/ip6_frag.c
+++ b/SylixOS/net/lwip/src/core/ipv6/ip6_frag.c
@@ -301,7 +301,11 @@ ip6_reass(struct pbuf *p)
LWIP_ASSERT("not a valid pbuf (ip6_input check missing?)", hdrdiff >= IP6_HLEN);
hdrdiff -= IP6_HLEN;
hdrdiff += IP6_FRAG_HLEN;
+#ifdef SYLIXOS /* SylixOS Reject 0-length fragments */
+ if (hdrdiff >= len) {
+#else
if (hdrdiff > len) {
+#endif
IP6_FRAG_STATS_INC(ip6_frag.proterr);
goto nullreturn;
}
diff --git a/SylixOS/net/lwip/src/core/tcp.c b/SylixOS/net/lwip/src/core/tcp.c
index b90b519..9b30c11 100644
--- a/SylixOS/net/lwip/src/core/tcp.c
+++ b/SylixOS/net/lwip/src/core/tcp.c
@@ -2328,12 +2328,17 @@ tcp_pcb_remove(struct tcp_pcb **pcblist, struct tcp_pcb *pcb)
u32_t
tcp_next_iss(struct tcp_pcb *pcb)
{
+ static u32_t iss = 6510;
#ifdef LWIP_HOOK_TCP_ISN
LWIP_ASSERT("tcp_next_iss: invalid pcb", pcb != NULL);
+#ifdef SYLIXOS /* Loopback network trust */
+ if (ip_addr_isloopback(&pcb->local_ip) && ip_addr_isloopback(&pcb->remote_ip)) {
+ iss += tcp_ticks; /* Fast get trust link iss */
+ return iss;
+ }
+#endif /* SYLIXOS */
return LWIP_HOOK_TCP_ISN(&pcb->local_ip, pcb->local_port, &pcb->remote_ip, pcb->remote_port);
#else /* LWIP_HOOK_TCP_ISN */
- static u32_t iss = 6510;
-
LWIP_ASSERT("tcp_next_iss: invalid pcb", pcb != NULL);
LWIP_UNUSED_ARG(pcb);
diff --git a/SylixOS/net/lwip/tcpext/tcp_isn.c b/SylixOS/net/lwip/tcpext/tcp_isn.c
new file mode 100644
index 0000000..09ffe25
--- /dev/null
+++ b/SylixOS/net/lwip/tcpext/tcp_isn.c
@@ -0,0 +1,176 @@
+/**
+ * @file
+ *
+ * Reference implementation of the TCP ISN algorithm standardized in RFC 6528.
+ * Produce TCP Initial Sequence Numbers by combining an MD5-generated hash
+ * based on the new TCP connection's identity and a stable secret, with the
+ * current time at 4-microsecond granularity.
+ *
+ * Specifically, the implementation uses MD5 to compute a hash of the input
+ * buffer, which contains both the four-tuple of the new TCP connection (local
+ * and remote IP address and port), as well as a 16-byte secret to make the
+ * results unpredictable to external parties. The secret must be given at
+ * initialization time and should ideally remain the same across system
+ * reboots. To be sure: the spoofing-resistance of the resulting ISN depends
+ * mainly on the strength of the supplied secret!
+ *
+ * The implementation takes 32 bits from the computed hash, and adds to it the
+ * current time, in 4-microsecond units. The current time is computed from a
+ * boot time given at initialization, and the current uptime as provided by
+ * sys_now(). Thus, it assumes that sys_now() returns a time value that is
+ * relative to the boot time, i.e., that it starts at 0 at system boot, and
+ * only ever increases monotonically.
+ *
+ * For efficiency reasons, a single MD5 input buffer is used, and partially
+ * filled in at initialization time. Specifically, of this 64-byte buffer, the
+ * first 36 bytes are used for the four-way TCP tuple data, followed by the
+ * 16-byte secret, followed by 12-byte zero padding. The 64-byte size of the
+ * buffer should achieve the best performance for the actual MD5 computation.
+ *
+ * Basic usage:
+ *
+ * 1. in your lwipopts.h, add the following lines:
+ *
+ * #include <lwip/arch.h>
+ * struct ip_addr;
+ * u32_t lwip_hook_tcp_isn(const struct ip_addr *local_ip, u16_t local_port,
+ * const struct ip_addr *remote_ip, u16_t remote_port);
+ * "#define LWIP_HOOK_TCP_ISN lwip_hook_tcp_isn";
+ *
+ * 2. from your own code, call lwip_init_tcp_isn() at initialization time, with
+ * appropriate parameters.
+ */
+
+/*
+ * Copyright (c) 2016 The MINIX 3 Project.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+ * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+ * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+ * OF SUCH DAMAGE.
+ *
+ * Author: David van Moolenbroek <david@minix3.org>
+ */
+
+#include "tcp_isn.h"
+#include "lwip/ip_addr.h"
+#include "lwip/sys.h"
+#include <string.h>
+
+#ifdef LWIP_HOOK_TCP_ISN
+
+#include "mbedtls/md5.h"
+
+static u8_t input[64];
+static u32_t base_time;
+
+/**
+ * Initialize the TCP ISN module, with the boot time and a secret.
+ *
+ * @param boot_time Wall clock boot time of the system, in seconds.
+ * @param secret_16_bytes A 16-byte secret used to randomize the TCP ISNs.
+ */
+void
+tcp_isn_init(time_t *boot_time, const u8_t *secret_16_bytes)
+{
+ /* Initialize the input buffer with the secret and trailing zeroes. */
+ memset(input, 0, sizeof(input));
+
+ MEMCPY(&input[36], secret_16_bytes, 16);
+
+ /* Save the boot time in 4-us units. Overflow is no problem here. */
+ base_time = (u32_t)(*boot_time * 250000);
+}
+
+/**
+ * Hook to generate an Initial Sequence Number (ISN) for a new TCP connection.
+ *
+ * @param local_ip The local IP address.
+ * @param local_port The local port number, in host-byte order.
+ * @param remote_ip The remote IP address.
+ * @param remote_port The remote port number, in host-byte order.
+ * @return The ISN to use for the new TCP connection.
+ */
+u32_t
+tcp_isn_hook(const ip_addr_t *local_ip, u16_t local_port,
+ const ip_addr_t *remote_ip, u16_t remote_port)
+{
+ mbedtls_md5_context ctx;
+ u8_t output[16];
+ u32_t isn;
+
+#if LWIP_IPV4 && LWIP_IPV6
+ if (IP_IS_V6(local_ip))
+#endif /* LWIP_IPV4 && LWIP_IPV6 */
+#if LWIP_IPV6
+ {
+ const ip6_addr_t *local_ip6, *remote_ip6;
+
+ local_ip6 = ip_2_ip6(local_ip);
+ remote_ip6 = ip_2_ip6(remote_ip);
+
+ SMEMCPY(&input[0], &local_ip6->addr, 16);
+ SMEMCPY(&input[16], &remote_ip6->addr, 16);
+ }
+#endif /* LWIP_IPV6 */
+#if LWIP_IPV4 && LWIP_IPV6
+ else
+#endif /* LWIP_IPV4 && LWIP_IPV6 */
+#if LWIP_IPV4
+ {
+ const ip4_addr_t *local_ip4, *remote_ip4;
+
+ local_ip4 = ip_2_ip4(local_ip);
+ remote_ip4 = ip_2_ip4(remote_ip);
+
+ /* Represent IPv4 addresses as IPv4-mapped IPv6 addresses, to ensure that
+ * the IPv4 and IPv6 address spaces are completely disjoint. */
+ memset(&input[0], 0, 10);
+ input[10] = 0xff;
+ input[11] = 0xff;
+ SMEMCPY(&input[12], &local_ip4->addr, 4);
+ memset(&input[16], 0, 10);
+ input[26] = 0xff;
+ input[27] = 0xff;
+ SMEMCPY(&input[28], &remote_ip4->addr, 4);
+ }
+#endif /* LWIP_IPV4 */
+
+ input[32] = (u8_t)(local_port >> 8);
+ input[33] = (u8_t)(local_port & 0xff);
+ input[34] = (u8_t)(remote_port >> 8);
+ input[35] = (u8_t)(remote_port & 0xff);
+
+ /* The secret and padding are already filled in. */
+
+ /* Generate the hash, using MD5. */
+ mbedtls_md5_starts(&ctx);
+ mbedtls_md5_update(&ctx, input, sizeof(input));
+ mbedtls_md5_finish(&ctx, output);
+
+ /* Arbitrarily take the first 32 bits from the generated hash. */
+ MEMCPY(&isn, output, sizeof(isn));
+
+ /* Add the current time in 4-microsecond units. */
+ return isn + base_time + sys_now() * 250;
+}
+
+#endif /* LWIP_HOOK_TCP_ISN */
diff --git a/SylixOS/net/lwip/tcpext/tcp_isn.h b/SylixOS/net/lwip/tcpext/tcp_isn.h
new file mode 100644
index 0000000..b5b6809
--- /dev/null
+++ b/SylixOS/net/lwip/tcpext/tcp_isn.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2016 The MINIX 3 Project.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+ * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+ * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+ * OF SUCH DAMAGE.
+ *
+ * Author: David van Moolenbroek <david@minix3.org>
+ */
+
+#ifndef LWIP_HDR_CONTRIB_ADDONS_TCP_ISN_H
+#define LWIP_HDR_CONTRIB_ADDONS_TCP_ISN_H
+
+#include "lwip/opt.h"
+#include "lwip/ip_addr.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void tcp_isn_init(time_t *boot_time, const u8_t *secret_16_bytes);
+u32_t tcp_isn_hook(const ip_addr_t *local_ip, u16_t local_port,
+ const ip_addr_t *remote_ip, u16_t remote_port);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LWIP_HDR_CONTRIB_ADDONS_TCP_ISN_H */
diff --git a/SylixOS/net/lwip/tcpsig/tcp_md5.c b/SylixOS/net/lwip/tcpext/tcp_md5.c
index d7e8c1b..d7e8c1b 100644
--- a/SylixOS/net/lwip/tcpsig/tcp_md5.c
+++ b/SylixOS/net/lwip/tcpext/tcp_md5.c
diff --git a/SylixOS/net/lwip/tcpsig/tcp_md5.h b/SylixOS/net/lwip/tcpext/tcp_md5.h
index 0947361..0947361 100644
--- a/SylixOS/net/lwip/tcpsig/tcp_md5.h
+++ b/SylixOS/net/lwip/tcpext/tcp_md5.h