kernel: fix linux-6.0 shortcut-fe build failure
This commit is contained in:
parent
5efaa0a935
commit
180046674f
@ -16,7 +16,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
include $(INCLUDE_DIR)/kernel.mk
|
include $(INCLUDE_DIR)/kernel.mk
|
||||||
|
|
||||||
PKG_NAME:=fast-classifier
|
PKG_NAME:=fast-classifier
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=6
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
@ -453,6 +453,7 @@ static int fast_classifier_update_protocol(struct sfe_connection_create *p_sic,
|
|||||||
{
|
{
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)
|
||||||
struct net *net=NULL ;
|
struct net *net=NULL ;
|
||||||
|
struct nf_tcp_net *tn=NULL;
|
||||||
#endif
|
#endif
|
||||||
switch (p_sic->protocol) {
|
switch (p_sic->protocol) {
|
||||||
case IPPROTO_TCP:
|
case IPPROTO_TCP:
|
||||||
@ -466,7 +467,8 @@ static int fast_classifier_update_protocol(struct sfe_connection_create *p_sic,
|
|||||||
p_sic->dest_td_max_end = ct->proto.tcp.seen[1].td_maxend;
|
p_sic->dest_td_max_end = ct->proto.tcp.seen[1].td_maxend;
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)
|
||||||
net = nf_ct_net(ct);
|
net = nf_ct_net(ct);
|
||||||
if ((net&&net->ct.sysctl_no_window_check)
|
tn = nf_tcp_pernet(net);
|
||||||
|
if ((tn&&tn->tcp_no_window_check)
|
||||||
#else
|
#else
|
||||||
if (nf_ct_tcp_no_window_check
|
if (nf_ct_tcp_no_window_check
|
||||||
#endif
|
#endif
|
||||||
|
@ -16,7 +16,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
include $(INCLUDE_DIR)/kernel.mk
|
include $(INCLUDE_DIR)/kernel.mk
|
||||||
|
|
||||||
PKG_NAME:=shortcut-fe
|
PKG_NAME:=shortcut-fe
|
||||||
PKG_RELEASE:=3
|
PKG_RELEASE:=8
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
@ -43,8 +43,6 @@ Shortcut is an in-Linux-kernel IP packet forwarding engine.
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
define KernelPackage/shortcut-fe/install
|
define KernelPackage/shortcut-fe/install
|
||||||
$(INSTALL_DIR) $(1)/etc/init.d
|
|
||||||
$(INSTALL_BIN) ./files/etc/init.d/shortcut-fe $(1)/etc/init.d
|
|
||||||
$(INSTALL_DIR) $(1)/usr/bin
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
$(INSTALL_BIN) ./files/usr/bin/sfe_dump $(1)/usr/bin
|
$(INSTALL_BIN) ./files/usr/bin/sfe_dump $(1)/usr/bin
|
||||||
endef
|
endef
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
#SFE connection manager has a lower priority, it should be started after other connection manager
|
#SFE connection manager has a lower priority, it should be started after other connection manager
|
||||||
#to detect the existence of connection manager with higher priority
|
#to detect the existence of connection manager with higher priority
|
||||||
START=99
|
START=70
|
||||||
|
|
||||||
have_cm() {
|
have_cm() {
|
||||||
[ -d "/sys/kernel/debug/ecm" ] && echo 1 && return
|
[ -d "/sys/kernel/debug/ecm" ] && echo 1 && return
|
||||||
|
@ -314,6 +314,7 @@ static unsigned int sfe_cm_post_routing(struct sk_buff *skb, int is_v4)
|
|||||||
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)
|
||||||
struct net *net=NULL;
|
struct net *net=NULL;
|
||||||
|
struct nf_tcp_net *tn=NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -502,7 +503,8 @@ static unsigned int sfe_cm_post_routing(struct sk_buff *skb, int is_v4)
|
|||||||
sic.dest_td_max_end = ct->proto.tcp.seen[1].td_maxend;
|
sic.dest_td_max_end = ct->proto.tcp.seen[1].td_maxend;
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)
|
||||||
net = nf_ct_net(ct);
|
net = nf_ct_net(ct);
|
||||||
if ((net&&net->ct.sysctl_no_window_check)
|
tn = nf_tcp_pernet(net);
|
||||||
|
if ((tn&&tn->tcp_no_window_check)
|
||||||
#else
|
#else
|
||||||
if (nf_ct_tcp_no_window_check
|
if (nf_ct_tcp_no_window_check
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user