1195972f6Sopenharmony_ciFrom 5e5195ad88819a77d59038ec49004d1e11801d08 Mon Sep 17 00:00:00 2001 2195972f6Sopenharmony_ciFrom: jiangheng <jiangheng14@huawei.com> 3195972f6Sopenharmony_ciDate: Fri, 8 Dec 2023 11:14:15 +0800 4195972f6Sopenharmony_ciSubject: [PATCH] frag: fix coredump when get netif 5195972f6Sopenharmony_ci 6195972f6Sopenharmony_ci--- 7195972f6Sopenharmony_ci src/core/ipv4/ip4_frag.c | 4 ++-- 8195972f6Sopenharmony_ci 1 file changed, 2 insertions(+), 2 deletions(-) 9195972f6Sopenharmony_ci 10195972f6Sopenharmony_cidiff --git a/src/core/ipv4/ip4_frag.c b/src/core/ipv4/ip4_frag.c 11195972f6Sopenharmony_ciindex f63a99e..b4a183a 100644 12195972f6Sopenharmony_ci--- a/src/core/ipv4/ip4_frag.c 13195972f6Sopenharmony_ci+++ b/src/core/ipv4/ip4_frag.c 14195972f6Sopenharmony_ci@@ -640,9 +640,9 @@ ip4_reass(struct pbuf *p) 15195972f6Sopenharmony_ci IPH_CHKSUM_SET(fraghdr, 0); 16195972f6Sopenharmony_ci /* @todo: do we need to set/calculate the correct checksum? */ 17195972f6Sopenharmony_ci #if CHECKSUM_GEN_IP 18195972f6Sopenharmony_ci- IF__NETIF_CHECKSUM_ENABLED(ip_current_input_netif(), NETIF_CHECKSUM_GEN_IP) { 19195972f6Sopenharmony_ci+ IF__NETIF_CHECKSUM_ENABLED(netif_default, NETIF_CHECKSUM_GEN_IP) { 20195972f6Sopenharmony_ci #if CHECKSUM_GEN_IP_HW 21195972f6Sopenharmony_ci- if (netif_get_txol_flags(ip_current_input_netif()) & DEV_TX_OFFLOAD_IPV4_CKSUM) { 22195972f6Sopenharmony_ci+ if (netif_get_txol_flags(netif_default) & DEV_TX_OFFLOAD_IPV4_CKSUM) { 23195972f6Sopenharmony_ci iph_cksum_set(p, IP_HLEN, 1); 24195972f6Sopenharmony_ci } else { 25195972f6Sopenharmony_ci iph_cksum_set(p, IP_HLEN, 0); 26195972f6Sopenharmony_ci-- 27195972f6Sopenharmony_ci2.27.0 28195972f6Sopenharmony_ci 29