diff --git a/backport-bug-54700-Unexpected-expiry-of-pending-ARP-table-ent.patch b/backport-bug-54700-Unexpected-expiry-of-pending-ARP-table-ent.patch deleted file mode 100644 index 156bef490b4f7c850ca6eccb78035ea061321043..0000000000000000000000000000000000000000 --- a/backport-bug-54700-Unexpected-expiry-of-pending-ARP-table-ent.patch +++ /dev/null @@ -1,33 +0,0 @@ -From ffbe075d5623c44bbf37618cce78d09ccd4e6760 Mon Sep 17 00:00:00 2001 -From: Florent Matignon -Date: Thu, 20 Sep 2018 16:40:34 +0200 -Subject: [PATCH] bug #54700: Unexpected expiry of pending ARP table entry -New etharp queries should restart the 5 second timeout on the ARP -table entry if it is still pending. -Signed-off-by: Simon Goldschmidt -Conflict: NA -Reference: https://git.savannah.gnu.org/cgit/lwip.git/commit/?id=ffbe075d5623c44bbf37618cce78d09ccd4e6760 ---- - src/core/ipv4/etharp.c | 8 ++++++++ - 1 file changed, 8 insertions(+) -diff --git a/src/core/ipv4/etharp.c b/src/core/ipv4/etharp.c -index b3b7c73c..9d7bf299 100644 ---- a/src/core/ipv4/etharp.c -+++ b/src/core/ipv4/etharp.c -@@ -984,6 +984,14 @@ etharp_query(struct netif *netif, const ip4_addr_t *ipaddr, struct pbuf *q) - /* We don't re-send arp request in etharp_tmr, but we still queue packets, - since this failure could be temporary, and the next packet calling - etharp_query again could lead to sending the queued packets. */ -+ } else { -+ /* ARP request successfully sent */ -+ if ((arp_table[i].state == ETHARP_STATE_PENDING) && !is_new_entry) { -+ /* A new ARP request has been sent for a pending entry. Reset the ctime to -+ not let it expire too fast. */ -+ LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: reset ctime for entry %"S16_F"\n", (s16_t)i)); -+ arp_table[i].ctime = 0; -+ } - } - if (q == NULL) { - return result; --- -2.28.0.windows.1 diff --git a/backport-tcp-Fix-double-free-in-tcp_split_unsent_seg.patch b/backport-tcp-Fix-double-free-in-tcp_split_unsent_seg.patch deleted file mode 100644 index 05addfe85280c35539af7b473cb63a5709ff8f0e..0000000000000000000000000000000000000000 --- a/backport-tcp-Fix-double-free-in-tcp_split_unsent_seg.patch +++ /dev/null @@ -1,24 +0,0 @@ -From e80d4ff2cc5f8f864e9e996c72b47ebefd2a5175 Mon Sep 17 00:00:00 2001 -From: Erik Ekman -Date: Fri, 19 Jun 2020 15:00:25 +0200 -Subject: [PATCH] tcp: Fix double free in tcp_split_unsent_seg() -Fixes bug #57377 (found by Hiromasa Ito). -Conflict: NA -Reference: https://git.savannah.gnu.org/cgit/lwip.git/commit/?id=e80d4ff2cc5f8f864e9e996c72b47ebefd2a5175 ---- - src/core/tcp_out.c | 1 + - 1 file changed, 1 insertion(+) -diff --git a/src/core/tcp_out.c b/src/core/tcp_out.c -index bfb033b1..d9d1b57b 100644 ---- a/src/core/tcp_out.c -+++ b/src/core/tcp_out.c -@@ -913,6 +913,7 @@ tcp_split_unsent_seg(struct tcp_pcb *pcb, u16_t split) - - seg = tcp_create_segment(pcb, p, remainder_flags, lwip_ntohl(useg->tcphdr->seqno) + split, optflags); - if (seg == NULL) { -+ p = NULL; /* Freed by tcp_create_segment */ - LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, - ("tcp_split_unsent_seg: could not create new TCP segment\n")); - goto memerr; --- -2.28.0.windows.1 diff --git a/backport-tcp-fix-sequence-number-comparison.patch b/backport-tcp-fix-sequence-number-comparison.patch deleted file mode 100644 index 5c0f960a721ac32863cc2b0a05d92165cabb7cb8..0000000000000000000000000000000000000000 --- a/backport-tcp-fix-sequence-number-comparison.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 003d34eebd223c16a3dbf6a970bb6e23cb7d1a24 Mon Sep 17 00:00:00 2001 -From: Simon Goldschmidt -Date: Fri, 27 Mar 2020 22:59:05 +0100 -Subject: [PATCH] tcp: fix sequence number comparison -This fixes both undefined behavior (see bug #51447) as well as a possible bug -where sequence numbers in 31 bit distance may come through. -Conflict: NA -Reference: https://git.savannah.gnu.org/cgit/lwip.git/commit/?id=003d34eebd223c16a3dbf6a970bb6e23cb7d1a24 ---- - src/include/lwip/priv/tcp_priv.h | 11 ++++------- - 1 file changed, 4 insertions(+), 7 deletions(-) -diff --git a/src/include/lwip/priv/tcp_priv.h b/src/include/lwip/priv/tcp_priv.h -index 72f9126d..c84b5be8 100644 ---- a/src/include/lwip/priv/tcp_priv.h -+++ b/src/include/lwip/priv/tcp_priv.h -@@ -106,14 +106,11 @@ err_t tcp_process_refused_data(struct tcp_pcb *pcb); - #define tcp_output_nagle(tpcb) (tcp_do_output_nagle(tpcb) ? tcp_output(tpcb) : ERR_OK) - - --#define TCP_SEQ_LT(a,b) ((s32_t)((u32_t)(a) - (u32_t)(b)) < 0) --#define TCP_SEQ_LEQ(a,b) ((s32_t)((u32_t)(a) - (u32_t)(b)) <= 0) --#define TCP_SEQ_GT(a,b) ((s32_t)((u32_t)(a) - (u32_t)(b)) > 0) --#define TCP_SEQ_GEQ(a,b) ((s32_t)((u32_t)(a) - (u32_t)(b)) >= 0) -+#define TCP_SEQ_LT(a,b) (((u32_t)((u32_t)(a) - (u32_t)(b)) & 0x80000000u) != 0) -+#define TCP_SEQ_LEQ(a,b) (!(TCP_SEQ_LT(b,a))) -+#define TCP_SEQ_GT(a,b) TCP_SEQ_LT(b,a) -+#define TCP_SEQ_GEQ(a,b) TCP_SEQ_LEQ(b,a) - /* is b<=a<=c? */ --#if 0 /* see bug #10548 */ --#define TCP_SEQ_BETWEEN(a,b,c) ((c)-(b) >= (a)-(b)) --#endif - #define TCP_SEQ_BETWEEN(a,b,c) (TCP_SEQ_GEQ(a,b) && TCP_SEQ_LEQ(a,c)) - - #ifndef TCP_TMR_INTERVAL --- -2.28.0.windows.1 diff --git a/backport-tcp-tighten-up-checks-for-received-SYN.patch b/backport-tcp-tighten-up-checks-for-received-SYN.patch deleted file mode 100644 index 0892cbf4e1033e88a3784a5552b4335b706c8e36..0000000000000000000000000000000000000000 --- a/backport-tcp-tighten-up-checks-for-received-SYN.patch +++ /dev/null @@ -1,58 +0,0 @@ -From adbc5b5f716d108966bcf606e61de60b83f525a5 Mon Sep 17 00:00:00 2001 -From: Simon Goldschmidt -Date: Thu, 5 Mar 2020 21:20:35 +0100 -Subject: [PATCH] tcp: tighten up checks for received SYN -Any malicous segment could contain a SYN up to now (no check). -A SYN in the wrong segment could break OOSEQ queueing. -Fix this by allowing SYN only in states where it is required. -See bug #56397: Assert "tcp_receive: ooseq tcplen > rcv_wnd" -Signed-off-by: Simon Goldschmidt -Conflict: NA -Reference: https://git.savannah.gnu.org/cgit/lwip.git/commit/?id=adbc5b5f716d108966bcf606e61de60b83f525a5 ---- - src/core/tcp_in.c | 17 +++++++++++++---- - 1 file changed, 13 insertions(+), 4 deletions(-) -diff --git a/src/core/tcp_in.c b/src/core/tcp_in.c -index 4bfba85f..90061281 100644 ---- a/src/core/tcp_in.c -+++ b/src/core/tcp_in.c -@@ -852,6 +852,13 @@ tcp_process(struct tcp_pcb *pcb) - - tcp_parseopt(pcb); - -+ if (flags & TCP_SYN) { -+ /* accept SYN only in 2 states: */ -+ if ((pcb->state != SYN_SENT) && (pcb->state != SYN_RCVD)) { -+ return ERR_OK; -+ } -+ } -+ - /* Do different things depending on the TCP state. */ - switch (pcb->state) { - case SYN_SENT: -@@ -924,7 +931,12 @@ tcp_process(struct tcp_pcb *pcb) - } - break; - case SYN_RCVD: -- if (flags & TCP_ACK) { -+ if (flags & TCP_SYN) { -+ if (seqno == pcb->rcv_nxt - 1) { -+ /* Looks like another copy of the SYN - retransmit our SYN-ACK */ -+ tcp_rexmit(pcb); -+ } -+ } else if (flags & TCP_ACK) { - /* expected ACK number? */ - if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) { - pcb->state = ESTABLISHED; -@@ -975,9 +987,6 @@ tcp_process(struct tcp_pcb *pcb) - tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), - ip_current_src_addr(), tcphdr->dest, tcphdr->src); - } -- } else if ((flags & TCP_SYN) && (seqno == pcb->rcv_nxt - 1)) { -- /* Looks like another copy of the SYN - retransmit our SYN-ACK */ -- tcp_rexmit(pcb); - } - break; - case CLOSE_WAIT: --- -2.28.0.windows.1 diff --git a/lwip-2.1.2.zip b/lwip-2.1.2.zip deleted file mode 100644 index d728ab590c215283e429dc108fb47654dfc0c4a4..0000000000000000000000000000000000000000 Binary files a/lwip-2.1.2.zip and /dev/null differ diff --git a/lwip-2.1.3.tar.gz b/lwip-2.1.3.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..07ccd3b49ea518ede770169d0278be2c3f143ba4 Binary files /dev/null and b/lwip-2.1.3.tar.gz differ diff --git a/lwip.spec b/lwip.spec index 2f402868672717b7ac769f765d6b9a17fd2775e1..4dc1e298fbd74c373d071c8e3f7075ae368c3738 100644 --- a/lwip.spec +++ b/lwip.spec @@ -3,17 +3,13 @@ Summary: lwip is a small independent implementation of the TCP/IP protocol suite Name: lwip -Version: 2.1.2 -Release: 2 +Version: 2.1.3 +Release: 1 License: BSD URL: http://savannah.nongnu.org/projects/lwip/ -Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.zip +Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.tar.gz Patch0: 0001-add-makefile.patch -Patch1: backport-bug-54700-Unexpected-expiry-of-pending-ARP-table-ent.patch -Patch2: backport-tcp-Fix-double-free-in-tcp_split_unsent_seg.patch -Patch3: backport-tcp-fix-sequence-number-comparison.patch -Patch4: backport-tcp-tighten-up-checks-for-received-SYN.patch BuildRequires: gcc-c++ dos2unix @@ -29,10 +25,6 @@ lwip is a small independent implementation of the TCP/IP protocol suite. find %{_builddir}/%{name}-%{version} -type f -exec dos2unix -q {} \; %patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 %build cd %{_builddir}/%{name}-%{version}/src @@ -48,6 +40,9 @@ cd %{_builddir}/%{name}-%{version}/src %{_libdir}/liblwip.a %changelog +* Fri Nov 26 2020 jiangheng - 2.1.3-1 +- update to 2.1.3 + * Mon Sep 06 2020 jiangheng - 2.1.2-2 - backport some patches from community