!617 ip4 frag: fix coredump when get netif

From: @jiangheng12 
Reviewed-by: @LemmyHuang 
Signed-off-by: @LemmyHuang
This commit is contained in:
openeuler-ci-bot 2023-12-08 03:28:58 +00:00 committed by Gitee
commit 85ab30cf43
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 33 additions and 1 deletions

View File

@ -0,0 +1,28 @@
From 5e5195ad88819a77d59038ec49004d1e11801d08 Mon Sep 17 00:00:00 2001
From: jiangheng <jiangheng14@huawei.com>
Date: Fri, 8 Dec 2023 11:14:15 +0800
Subject: [PATCH] frag: fix coredump when get netif
---
src/core/ipv4/ip4_frag.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/core/ipv4/ip4_frag.c b/src/core/ipv4/ip4_frag.c
index f63a99e..b4a183a 100644
--- a/src/core/ipv4/ip4_frag.c
+++ b/src/core/ipv4/ip4_frag.c
@@ -640,9 +640,9 @@ ip4_reass(struct pbuf *p)
IPH_CHKSUM_SET(fraghdr, 0);
/* @todo: do we need to set/calculate the correct checksum? */
#if CHECKSUM_GEN_IP
- IF__NETIF_CHECKSUM_ENABLED(ip_current_input_netif(), NETIF_CHECKSUM_GEN_IP) {
+ IF__NETIF_CHECKSUM_ENABLED(default_netif, NETIF_CHECKSUM_GEN_IP) {
#if CHECKSUM_GEN_IP_HW
- if (netif_get_txol_flags(ip_current_input_netif()) & DEV_TX_OFFLOAD_IPV4_CKSUM) {
+ if (netif_get_txol_flags(default_netif) & DEV_TX_OFFLOAD_IPV4_CKSUM) {
iph_cksum_set(p, IP_HLEN, 1);
} else {
iph_cksum_set(p, IP_HLEN, 0);
--
2.27.0

View File

@ -4,7 +4,7 @@
Summary: lwip is a small independent implementation of the TCP/IP protocol suite
Name: lwip
Version: 2.1.3
Release: 92
Release: 93
License: BSD
URL: http://savannah.nongnu.org/projects/lwip/
Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.zip
@ -103,6 +103,7 @@ Patch9085: 0086-log-add-errevent-log-and-tcp-exception-statistics.patch
Patch9086: 0087-support-vlan-offload.patch
Patch9087: 0088-modify-log-info-err.patch
Patch9088: 0089-add-struct-gz-addr.patch
Patch9089: 0090-frag-fix-coredump-when-get-netif.patch
BuildRequires: gcc-c++ dos2unix dpdk-devel
@ -133,6 +134,9 @@ cd %{_builddir}/%{name}-%{version}/src
%{_libdir}/liblwip.a
%changelog
* Fri Dec 8 2023 jiangheng <jiangheng14@huawei.com> - 2.1.3-93
- ip4 frag: fix coredump when get netif
* Wed Dec 6 2023 zhengjiebing <zhengjiebing@cmss.chinamobile.com> - 2.1.3-92
- add struct gz_addr_t