|
@@ -120,13 +120,6 @@ extern int cipso_v4_rbm_optfmt;
|
|
|
extern int cipso_v4_rbm_strictvalid;
|
|
|
#endif
|
|
|
|
|
|
-/*
|
|
|
- * Helper Functions
|
|
|
- */
|
|
|
-
|
|
|
-#define CIPSO_V4_OPTEXIST(x) (IPCB(x)->opt.cipso != 0)
|
|
|
-#define CIPSO_V4_OPTPTR(x) (skb_network_header(x) + IPCB(x)->opt.cipso)
|
|
|
-
|
|
|
/*
|
|
|
* DOI List Functions
|
|
|
*/
|
|
@@ -190,7 +183,7 @@ static inline int cipso_v4_doi_domhsh_remove(struct cipso_v4_doi *doi_def,
|
|
|
|
|
|
#ifdef CONFIG_NETLABEL
|
|
|
void cipso_v4_cache_invalidate(void);
|
|
|
-int cipso_v4_cache_add(const struct sk_buff *skb,
|
|
|
+int cipso_v4_cache_add(const unsigned char *cipso_ptr,
|
|
|
const struct netlbl_lsm_secattr *secattr);
|
|
|
#else
|
|
|
static inline void cipso_v4_cache_invalidate(void)
|
|
@@ -198,7 +191,7 @@ static inline void cipso_v4_cache_invalidate(void)
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
-static inline int cipso_v4_cache_add(const struct sk_buff *skb,
|
|
|
+static inline int cipso_v4_cache_add(const unsigned char *cipso_ptr,
|
|
|
const struct netlbl_lsm_secattr *secattr)
|
|
|
{
|
|
|
return 0;
|
|
@@ -211,6 +204,8 @@ static inline int cipso_v4_cache_add(const struct sk_buff *skb,
|
|
|
|
|
|
#ifdef CONFIG_NETLABEL
|
|
|
void cipso_v4_error(struct sk_buff *skb, int error, u32 gateway);
|
|
|
+int cipso_v4_getattr(const unsigned char *cipso,
|
|
|
+ struct netlbl_lsm_secattr *secattr);
|
|
|
int cipso_v4_sock_setattr(struct sock *sk,
|
|
|
const struct cipso_v4_doi *doi_def,
|
|
|
const struct netlbl_lsm_secattr *secattr);
|
|
@@ -226,6 +221,7 @@ int cipso_v4_skbuff_setattr(struct sk_buff *skb,
|
|
|
int cipso_v4_skbuff_delattr(struct sk_buff *skb);
|
|
|
int cipso_v4_skbuff_getattr(const struct sk_buff *skb,
|
|
|
struct netlbl_lsm_secattr *secattr);
|
|
|
+unsigned char *cipso_v4_optptr(const struct sk_buff *skb);
|
|
|
int cipso_v4_validate(const struct sk_buff *skb, unsigned char **option);
|
|
|
#else
|
|
|
static inline void cipso_v4_error(struct sk_buff *skb,
|
|
@@ -235,6 +231,12 @@ static inline void cipso_v4_error(struct sk_buff *skb,
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+static inline int cipso_v4_getattr(const unsigned char *cipso,
|
|
|
+ struct netlbl_lsm_secattr *secattr)
|
|
|
+{
|
|
|
+ return -ENOSYS;
|
|
|
+}
|
|
|
+
|
|
|
static inline int cipso_v4_sock_setattr(struct sock *sk,
|
|
|
const struct cipso_v4_doi *doi_def,
|
|
|
const struct netlbl_lsm_secattr *secattr)
|
|
@@ -282,6 +284,11 @@ static inline int cipso_v4_skbuff_getattr(const struct sk_buff *skb,
|
|
|
return -ENOSYS;
|
|
|
}
|
|
|
|
|
|
+static inline unsigned char *cipso_v4_optptr(const struct sk_buff *skb)
|
|
|
+{
|
|
|
+ return NULL;
|
|
|
+}
|
|
|
+
|
|
|
static inline int cipso_v4_validate(const struct sk_buff *skb,
|
|
|
unsigned char **option)
|
|
|
{
|