fix vlan filter bug
(cherry picked from commit 74a719175a88a9baddeb25ae83337f0f483ff1b8)
This commit is contained in:
parent
9762da96fa
commit
521e00f6d1
25
0136-fix-vlan-filter-bug.patch
Normal file
25
0136-fix-vlan-filter-bug.patch
Normal file
@ -0,0 +1,25 @@
|
||||
diff --git a/src/netif/ethernet.c b/src/netif/ethernet.c
|
||||
index d0d68b3..5ba6d95 100644
|
||||
--- a/src/netif/ethernet.c
|
||||
+++ b/src/netif/ethernet.c
|
||||
@@ -123,7 +123,9 @@ ethernet_input(struct pbuf *p, struct netif *netif)
|
||||
goto free_and_return;
|
||||
}
|
||||
#if GAZELLE_ENABLE
|
||||
- if (netif->vlan_enable && !(netif->txol_flags & RTE_ETH_RX_OFFLOAD_VLAN_FILTER) && VLAN_ID(vlan) != netif->vlan_tci) {
|
||||
+ /* 1.if vlan mode is not enable, ignore VLAN packets.
|
||||
+ 2.if vlan mode is enable, ignore packets not for our VLAN */
|
||||
+ if (netif->vlan_enable == false || (netif->vlan_enable && VLAN_ID(vlan) != netif->vlan_tci)) {
|
||||
goto free_and_return;
|
||||
}
|
||||
#endif
|
||||
@@ -141,6 +143,9 @@ ethernet_input(struct pbuf *p, struct netif *netif)
|
||||
}
|
||||
#endif /* defined(LWIP_HOOK_VLAN_CHECK) || defined(ETHARP_VLAN_CHECK) || defined(ETHARP_VLAN_CHECK_FN) */
|
||||
type = vlan->tpid;
|
||||
+ } else if (netif->vlan_enable && !(netif->txol_flags & RTE_ETH_RX_OFFLOAD_VLAN_STRIP)) {
|
||||
+ /* if vlan mode is enable but vlan strip offload is off, ignore packets without vlan info. */
|
||||
+ goto free_and_return;
|
||||
}
|
||||
#endif /* ETHARP_SUPPORT_VLAN */
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
Summary: lwip is a small independent implementation of the TCP/IP protocol suite
|
||||
Name: lwip
|
||||
Version: 2.2.0
|
||||
Release: 28
|
||||
Release: 29
|
||||
License: BSD
|
||||
URL: http://savannah.nongnu.org/projects/lwip/
|
||||
Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.zip
|
||||
@ -147,6 +147,7 @@ Patch9131: 0132-mod-udp-loop-mem-leak.patch
|
||||
Patch9132: 0133-allow-membership-to-register-multiple-times.patch
|
||||
Patch9133: 0134-mod-checksum-of-ip_hdr-and-udp_hdr.patch
|
||||
Patch9134: 0135-change-STAT_COUNTER-from-u16-to-u64.patch
|
||||
Patch9135: 0136-fix-vlan-filter-bug.patch
|
||||
|
||||
BuildRequires: gcc-c++ dos2unix dpdk-devel
|
||||
|
||||
@ -176,6 +177,9 @@ cd %{_builddir}/%{name}-%{version}/src
|
||||
%{_libdir}/liblwip.a
|
||||
|
||||
%changelog
|
||||
* Fri May 24 2024 zhengjiebing <zhengjiebing@cmss.chinamobile.com> - 2.2.0-29
|
||||
- fix vlan filter bug
|
||||
|
||||
* Tue May 21 2024 ningjin <ningjin@kylinos.cn> - 2.2.0-28
|
||||
- change change STAT_COUNTER from u16 to u64
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user