{IPCOMP_LZJH, "lzjh" },
};
-/**
- * IPsec HW offload state in kernel
- */
-typedef enum {
- NL_OFFLOAD_UNKNOWN,
- NL_OFFLOAD_UNSUPPORTED,
- NL_OFFLOAD_SUPPORTED
-} nl_offload_state_t;
-
-/**
- * Global metadata used for IPsec HW offload
- */
-static struct {
- /** bit in feature set */
- u_int bit;
- /** total number of device feature blocks */
- u_int total_blocks;
- /** determined HW offload state */
- nl_offload_state_t state;
-} netlink_hw_offload;
-
/**
* Look up a kernel algorithm name and its key size
*/
return TRUE;
}
+/* ETHTOOL_GSSET_INFO is available since 2.6.34 and ETH_SS_FEATURES (enum) and
+ * ETHTOOL_GFEATURES since 2.6.39, so check for the latter */
+#ifdef ETHTOOL_GFEATURES
+
+/**
+ * IPsec HW offload state in kernel
+ */
+typedef enum {
+ NL_OFFLOAD_UNKNOWN,
+ NL_OFFLOAD_UNSUPPORTED,
+ NL_OFFLOAD_SUPPORTED
+} nl_offload_state_t;
+
+/**
+ * Global metadata used for IPsec HW offload
+ */
+static struct {
+ /** bit in feature set */
+ u_int bit;
+ /** total number of device feature blocks */
+ u_int total_blocks;
+ /** determined HW offload state */
+ nl_offload_state_t state;
+} netlink_hw_offload;
+
/**
* Check if kernel supports HW offload
*/
return ret;
}
+#else
+
+static bool netlink_detect_offload(const char *ifname)
+{
+ return FALSE;
+}
+
+#endif
+
/**
* There are 3 HW offload configuration values:
* 1. HW_OFFLOAD_NO : Do not configure HW offload.