mirror of
https://github.com/qosmio/nss-packages.git
synced 2025-12-16 08:12:53 +00:00
nss-clients: GRE: Fix building on kernels < 6.10
Signed-off-by: Sean Khan <datapronix@protonmail.com>
This commit is contained in:
parent
6b2d99511c
commit
589db1c9c8
@ -170,14 +170,17 @@
|
||||
t->dev = dev;
|
||||
return GRE_SUCCESS;
|
||||
}
|
||||
@@ -322,8 +330,8 @@ int nss_connmgr_gre_v4_get_config(struct
|
||||
@@ -322,8 +330,13 @@ int nss_connmgr_gre_v4_get_config(struct
|
||||
memcpy(cmsg->src_ip, &src_ip, 4);
|
||||
memcpy(cmsg->dest_ip, &dest_ip, 4);
|
||||
|
||||
- cmsg->flags |= nss_connmgr_gre_get_nss_config_flags(t->parms.o_flags,
|
||||
- t->parms.i_flags,
|
||||
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(6, 10, 0)
|
||||
cmsg->flags |= nss_connmgr_gre_get_nss_config_flags(t->parms.o_flags,
|
||||
t->parms.i_flags,
|
||||
+#else
|
||||
+ cmsg->flags |= nss_connmgr_gre_get_nss_config_flags(*t->parms.o_flags,
|
||||
+ *t->parms.i_flags,
|
||||
+#endif
|
||||
iphdr->tos, iphdr->ttl,
|
||||
iphdr->frag_off);
|
||||
|
||||
@ -797,14 +800,17 @@
|
||||
t->dev = dev;
|
||||
return GRE_SUCCESS;
|
||||
}
|
||||
@@ -359,8 +359,8 @@ int nss_connmgr_gre_v6_get_config(struct
|
||||
@@ -359,8 +359,13 @@ int nss_connmgr_gre_v6_get_config(struct
|
||||
/*
|
||||
* IPv6 outer tos field is always inherited from inner IP header.
|
||||
*/
|
||||
- cmsg->flags |= nss_connmgr_gre_get_nss_config_flags(t->parms.o_flags,
|
||||
- t->parms.i_flags,
|
||||
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(6, 10, 0)
|
||||
cmsg->flags |= nss_connmgr_gre_get_nss_config_flags(t->parms.o_flags,
|
||||
t->parms.i_flags,
|
||||
+#else
|
||||
+ cmsg->flags |= nss_connmgr_gre_get_nss_config_flags(*t->parms.o_flags,
|
||||
+ *t->parms.i_flags,
|
||||
+#endif
|
||||
t->parms.flowinfo,
|
||||
t->parms.hop_limit, 0);
|
||||
|
||||
|
||||
@ -158,7 +158,7 @@
|
||||
if (IS_ERR(rt)) {
|
||||
nss_connmgr_gre_warning("route look up failed for %pI4\n", &raddr);
|
||||
return GRE_ERR_RADDR_ROUTE_LOOKUP;
|
||||
@@ -208,9 +216,9 @@ int nss_connmgr_gre_v4_set_config(struct
|
||||
@@ -216,9 +224,9 @@ int nss_connmgr_gre_v4_set_config(struct
|
||||
t->parms.o_key = cfg->okey;
|
||||
}
|
||||
|
||||
@ -170,14 +170,17 @@
|
||||
t->dev = dev;
|
||||
return GRE_SUCCESS;
|
||||
}
|
||||
@@ -322,8 +330,8 @@ int nss_connmgr_gre_v4_get_config(struct
|
||||
@@ -330,8 +338,13 @@ int nss_connmgr_gre_v4_get_config(struct
|
||||
memcpy(cmsg->src_ip, &src_ip, 4);
|
||||
memcpy(cmsg->dest_ip, &dest_ip, 4);
|
||||
|
||||
- cmsg->flags |= nss_connmgr_gre_get_nss_config_flags(t->parms.o_flags,
|
||||
- t->parms.i_flags,
|
||||
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(6, 10, 0)
|
||||
cmsg->flags |= nss_connmgr_gre_get_nss_config_flags(t->parms.o_flags,
|
||||
t->parms.i_flags,
|
||||
+#else
|
||||
+ cmsg->flags |= nss_connmgr_gre_get_nss_config_flags(*t->parms.o_flags,
|
||||
+ *t->parms.i_flags,
|
||||
+#endif
|
||||
iphdr->tos, iphdr->ttl,
|
||||
iphdr->frag_off);
|
||||
|
||||
@ -797,14 +800,17 @@
|
||||
t->dev = dev;
|
||||
return GRE_SUCCESS;
|
||||
}
|
||||
@@ -359,8 +359,8 @@ int nss_connmgr_gre_v6_get_config(struct
|
||||
@@ -359,8 +359,13 @@ int nss_connmgr_gre_v6_get_config(struct
|
||||
/*
|
||||
* IPv6 outer tos field is always inherited from inner IP header.
|
||||
*/
|
||||
- cmsg->flags |= nss_connmgr_gre_get_nss_config_flags(t->parms.o_flags,
|
||||
- t->parms.i_flags,
|
||||
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(6, 10, 0)
|
||||
cmsg->flags |= nss_connmgr_gre_get_nss_config_flags(t->parms.o_flags,
|
||||
t->parms.i_flags,
|
||||
+#else
|
||||
+ cmsg->flags |= nss_connmgr_gre_get_nss_config_flags(*t->parms.o_flags,
|
||||
+ *t->parms.i_flags,
|
||||
+#endif
|
||||
t->parms.flowinfo,
|
||||
t->parms.hop_limit, 0);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user