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
|
||||
|
||||
PKG_NAME:=fast-classifier
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=6
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user