summaryrefslogtreecommitdiff
path: root/include/net/netlabel.h
diff options
context:
space:
mode:
authorHuw Davies <huw@codeweavers.com>2016-06-27 22:02:51 +0300
committerPaul Moore <paul@paul-moore.com>2016-06-27 22:02:51 +0300
commitceba1832b1b2da0149c51de62a847c00bca1677a (patch)
tree5f03426f96c98a387cc1087865fe99b32410561c /include/net/netlabel.h
parent3faa8f982f958961fda68b8d63e682fe77a032d4 (diff)
downloadlinux-ceba1832b1b2da0149c51de62a847c00bca1677a.tar.xz
calipso: Set the calipso socket label to match the secattr.
CALIPSO is a hop-by-hop IPv6 option. A lot of this patch is based on the equivalent CISPO code. The main difference is due to manipulating the options in the hop-by-hop header. Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'include/net/netlabel.h')
-rw-r--r--include/net/netlabel.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/net/netlabel.h b/include/net/netlabel.h
index 9fc2cab9be98..918a6044c89c 100644
--- a/include/net/netlabel.h
+++ b/include/net/netlabel.h
@@ -226,6 +226,9 @@ struct netlbl_lsm_secattr {
* @doi_getdef: returns a reference to a DOI
* @doi_putdef: releases a reference of a DOI
* @doi_walk: enumerate the DOI list
+ * @sock_getattr: retrieve the socket's attr
+ * @sock_setattr: set the socket's attr
+ * @sock_delattr: remove the socket's attr
*
* Description:
* This structure is filled out by the CALIPSO engine and passed
@@ -243,6 +246,12 @@ struct netlbl_calipso_ops {
int (*doi_walk)(u32 *skip_cnt,
int (*callback)(struct calipso_doi *doi_def, void *arg),
void *cb_arg);
+ int (*sock_getattr)(struct sock *sk,
+ struct netlbl_lsm_secattr *secattr);
+ int (*sock_setattr)(struct sock *sk,
+ const struct calipso_doi *doi_def,
+ const struct netlbl_lsm_secattr *secattr);
+ void (*sock_delattr)(struct sock *sk);
};
/*