diff --git a/package/lean/shortcut-fe/fast-classifier/Makefile b/package/lean/shortcut-fe/fast-classifier/Makefile index e62df6cea..09c1174dd 100644 --- a/package/lean/shortcut-fe/fast-classifier/Makefile +++ b/package/lean/shortcut-fe/fast-classifier/Makefile @@ -16,7 +16,7 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=fast-classifier -PKG_RELEASE:=2 +PKG_RELEASE:=6 include $(INCLUDE_DIR)/package.mk diff --git a/package/lean/shortcut-fe/fast-classifier/src/fast-classifier.c b/package/lean/shortcut-fe/fast-classifier/src/fast-classifier.c index 1deb1eb5f..944dfae38 100644 --- a/package/lean/shortcut-fe/fast-classifier/src/fast-classifier.c +++ b/package/lean/shortcut-fe/fast-classifier/src/fast-classifier.c @@ -451,8 +451,9 @@ static u32 fc_conn_hash(sfe_ip_addr_t *saddr, sfe_ip_addr_t *daddr, */ static int fast_classifier_update_protocol(struct sfe_connection_create *p_sic, struct nf_conn *ct) { - #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0) + #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0) struct net *net=NULL ; + struct nf_tcp_net *tn=NULL; #endif switch (p_sic->protocol) { case IPPROTO_TCP: @@ -464,9 +465,10 @@ static int fast_classifier_update_protocol(struct sfe_connection_create *p_sic, p_sic->dest_td_max_window = ct->proto.tcp.seen[1].td_maxwin; p_sic->dest_td_end = ct->proto.tcp.seen[1].td_end; 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); - if ((net&&net->ct.sysctl_no_window_check) + tn = nf_tcp_pernet(net); + if ((tn&&tn->tcp_no_window_check) #else if (nf_ct_tcp_no_window_check #endif diff --git a/package/lean/shortcut-fe/shortcut-fe/Makefile b/package/lean/shortcut-fe/shortcut-fe/Makefile index 5712fe676..dd53042e5 100644 --- a/package/lean/shortcut-fe/shortcut-fe/Makefile +++ b/package/lean/shortcut-fe/shortcut-fe/Makefile @@ -16,7 +16,7 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=shortcut-fe -PKG_RELEASE:=3 +PKG_RELEASE:=8 include $(INCLUDE_DIR)/package.mk @@ -43,8 +43,6 @@ Shortcut is an in-Linux-kernel IP packet forwarding engine. endef 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_BIN) ./files/usr/bin/sfe_dump $(1)/usr/bin endef diff --git a/package/lean/shortcut-fe/shortcut-fe/files/etc/init.d/shortcut-fe b/package/lean/shortcut-fe/shortcut-fe/files/etc/init.d/shortcut-fe index dd666f8f0..838512a36 100755 --- a/package/lean/shortcut-fe/shortcut-fe/files/etc/init.d/shortcut-fe +++ b/package/lean/shortcut-fe/shortcut-fe/files/etc/init.d/shortcut-fe @@ -15,7 +15,7 @@ #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 -START=99 +START=70 have_cm() { [ -d "/sys/kernel/debug/ecm" ] && echo 1 && return diff --git a/package/lean/shortcut-fe/shortcut-fe/src/sfe_cm.c b/package/lean/shortcut-fe/shortcut-fe/src/sfe_cm.c index 3c68ff37f..2d3f79a04 100644 --- a/package/lean/shortcut-fe/shortcut-fe/src/sfe_cm.c +++ b/package/lean/shortcut-fe/shortcut-fe/src/sfe_cm.c @@ -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) struct net *net=NULL; + struct nf_tcp_net *tn=NULL; #endif /* @@ -500,9 +501,10 @@ static unsigned int sfe_cm_post_routing(struct sk_buff *skb, int is_v4) sic.dest_td_max_window = ct->proto.tcp.seen[1].td_maxwin; sic.dest_td_end = ct->proto.tcp.seen[1].td_end; 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); - if ((net&&net->ct.sysctl_no_window_check) + tn = nf_tcp_pernet(net); + if ((tn&&tn->tcp_no_window_check) #else if (nf_ct_tcp_no_window_check #endif