summaryrefslogtreecommitdiff
path: root/system.c
diff options
context:
space:
mode:
authorAndré Valentin <avalentin@marcant.net>2019-06-08 13:48:09 +0200
committerHans Dedecker <dedeckeh@gmail.com>2019-06-08 14:00:22 +0200
commit8c6358b5d42fe3ca05801823552ca5a2003bf792 (patch)
tree64cf11b23c18d7b9c837297248171bdf76b3f09a /system.c
parentbeb810dbccee098add0347d551eb5362e404fbdc (diff)
downloadnetifd-8c6358b5d42fe3ca05801823552ca5a2003bf792.tar.gz
netifd: add xfrm tunnel interface support
This adds support for xfrm interfaces. These interfaces can be used since linux 4.19 for IPsec traffic, like VTI interface. XFRM interfaces are less complicated compared to VTI because they need no IP tunnel endpoints.
Diffstat (limited to 'system.c')
-rw-r--r--system.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/system.c b/system.c
index dd9ab50..bbdfef7 100644
--- a/system.c
+++ b/system.c
@@ -70,6 +70,15 @@ const struct uci_blob_param_list vti_data_attr_list = {
.params = vti_data_attrs,
};
+static const struct blobmsg_policy xfrm_data_attrs[__XFRM_DATA_ATTR_MAX] = {
+ [XFRM_DATA_IF_ID] = { .name = "ifid", .type = BLOBMSG_TYPE_INT32 },
+};
+
+const struct uci_blob_param_list xfrm_data_attr_list = {
+ .n_params = __XFRM_DATA_ATTR_MAX,
+ .params = xfrm_data_attrs,
+};
+
static const struct blobmsg_policy sixrd_data_attrs[__SIXRD_DATA_ATTR_MAX] = {
[SIXRD_DATA_PREFIX] = { .name = "prefix", .type = BLOBMSG_TYPE_STRING },
[SIXRD_DATA_RELAY_PREFIX] = { .name = "relay-prefix", .type = BLOBMSG_TYPE_STRING },