diff options
author | David S. Miller <davem@davemloft.net> | 2008-10-31 02:57:40 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-31 02:57:40 -0400 |
commit | e5e7ad44d05d3f8227a10a17761505fce2c08e38 (patch) | |
tree | 2417654b9fbc2f709a1c8990894c2712a8d671e1 | |
parent | 61e5744849cb936bf4361181b8f9ebccebf4d9db (diff) | |
parent | 47b676c0e03dcfd88de91f6f24a06653cfdf32af (diff) |
Merge branch 'master' of git://git.infradead.org/users/pcmoore/lblnet-2.6
-rw-r--r-- | net/ipv4/cipso_ipv4.c | 7 | ||||
-rw-r--r-- | net/netlabel/netlabel_addrlist.c | 2 | ||||
-rw-r--r-- | net/netlabel/netlabel_addrlist.h | 22 | ||||
-rw-r--r-- | net/netlabel/netlabel_mgmt.c | 2 |
4 files changed, 29 insertions, 4 deletions
diff --git a/net/ipv4/cipso_ipv4.c b/net/ipv4/cipso_ipv4.c index 490e035c6d90..2e78f6bd9775 100644 --- a/net/ipv4/cipso_ipv4.c +++ b/net/ipv4/cipso_ipv4.c | |||
@@ -2063,9 +2063,10 @@ int cipso_v4_skbuff_setattr(struct sk_buff *skb, | |||
2063 | u32 opt_len; | 2063 | u32 opt_len; |
2064 | int len_delta; | 2064 | int len_delta; |
2065 | 2065 | ||
2066 | buf_len = cipso_v4_genopt(buf, buf_len, doi_def, secattr); | 2066 | ret_val = cipso_v4_genopt(buf, buf_len, doi_def, secattr); |
2067 | if (buf_len < 0) | 2067 | if (ret_val < 0) |
2068 | return buf_len; | 2068 | return ret_val; |
2069 | buf_len = ret_val; | ||
2069 | opt_len = (buf_len + 3) & ~3; | 2070 | opt_len = (buf_len + 3) & ~3; |
2070 | 2071 | ||
2071 | /* we overwrite any existing options to ensure that we have enough | 2072 | /* we overwrite any existing options to ensure that we have enough |
diff --git a/net/netlabel/netlabel_addrlist.c b/net/netlabel/netlabel_addrlist.c index b0925a303353..249f6b92f153 100644 --- a/net/netlabel/netlabel_addrlist.c +++ b/net/netlabel/netlabel_addrlist.c | |||
@@ -315,6 +315,7 @@ struct netlbl_af6list *netlbl_af6list_remove(const struct in6_addr *addr, | |||
315 | * Audit Helper Functions | 315 | * Audit Helper Functions |
316 | */ | 316 | */ |
317 | 317 | ||
318 | #ifdef CONFIG_AUDIT | ||
318 | /** | 319 | /** |
319 | * netlbl_af4list_audit_addr - Audit an IPv4 address | 320 | * netlbl_af4list_audit_addr - Audit an IPv4 address |
320 | * @audit_buf: audit buffer | 321 | * @audit_buf: audit buffer |
@@ -386,3 +387,4 @@ void netlbl_af6list_audit_addr(struct audit_buffer *audit_buf, | |||
386 | } | 387 | } |
387 | } | 388 | } |
388 | #endif /* IPv6 */ | 389 | #endif /* IPv6 */ |
390 | #endif /* CONFIG_AUDIT */ | ||
diff --git a/net/netlabel/netlabel_addrlist.h b/net/netlabel/netlabel_addrlist.h index 0242bead405f..07ae7fd82be1 100644 --- a/net/netlabel/netlabel_addrlist.h +++ b/net/netlabel/netlabel_addrlist.h | |||
@@ -120,9 +120,19 @@ struct netlbl_af4list *netlbl_af4list_search(__be32 addr, | |||
120 | struct netlbl_af4list *netlbl_af4list_search_exact(__be32 addr, | 120 | struct netlbl_af4list *netlbl_af4list_search_exact(__be32 addr, |
121 | __be32 mask, | 121 | __be32 mask, |
122 | struct list_head *head); | 122 | struct list_head *head); |
123 | |||
124 | #ifdef CONFIG_AUDIT | ||
123 | void netlbl_af4list_audit_addr(struct audit_buffer *audit_buf, | 125 | void netlbl_af4list_audit_addr(struct audit_buffer *audit_buf, |
124 | int src, const char *dev, | 126 | int src, const char *dev, |
125 | __be32 addr, __be32 mask); | 127 | __be32 addr, __be32 mask); |
128 | #else | ||
129 | static inline void netlbl_af4list_audit_addr(struct audit_buffer *audit_buf, | ||
130 | int src, const char *dev, | ||
131 | __be32 addr, __be32 mask) | ||
132 | { | ||
133 | return; | ||
134 | } | ||
135 | #endif | ||
126 | 136 | ||
127 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 137 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) |
128 | 138 | ||
@@ -179,11 +189,23 @@ struct netlbl_af6list *netlbl_af6list_search(const struct in6_addr *addr, | |||
179 | struct netlbl_af6list *netlbl_af6list_search_exact(const struct in6_addr *addr, | 189 | struct netlbl_af6list *netlbl_af6list_search_exact(const struct in6_addr *addr, |
180 | const struct in6_addr *mask, | 190 | const struct in6_addr *mask, |
181 | struct list_head *head); | 191 | struct list_head *head); |
192 | |||
193 | #ifdef CONFIG_AUDIT | ||
182 | void netlbl_af6list_audit_addr(struct audit_buffer *audit_buf, | 194 | void netlbl_af6list_audit_addr(struct audit_buffer *audit_buf, |
183 | int src, | 195 | int src, |
184 | const char *dev, | 196 | const char *dev, |
185 | const struct in6_addr *addr, | 197 | const struct in6_addr *addr, |
186 | const struct in6_addr *mask); | 198 | const struct in6_addr *mask); |
199 | #else | ||
200 | static inline void netlbl_af6list_audit_addr(struct audit_buffer *audit_buf, | ||
201 | int src, | ||
202 | const char *dev, | ||
203 | const struct in6_addr *addr, | ||
204 | const struct in6_addr *mask) | ||
205 | { | ||
206 | return; | ||
207 | } | ||
208 | #endif | ||
187 | #endif /* IPV6 */ | 209 | #endif /* IPV6 */ |
188 | 210 | ||
189 | #endif | 211 | #endif |
diff --git a/net/netlabel/netlabel_mgmt.c b/net/netlabel/netlabel_mgmt.c index ee769ecaa13c..0a0ef17b2a40 100644 --- a/net/netlabel/netlabel_mgmt.c +++ b/net/netlabel/netlabel_mgmt.c | |||
@@ -265,7 +265,7 @@ add_failure: | |||
265 | static int netlbl_mgmt_listentry(struct sk_buff *skb, | 265 | static int netlbl_mgmt_listentry(struct sk_buff *skb, |
266 | struct netlbl_dom_map *entry) | 266 | struct netlbl_dom_map *entry) |
267 | { | 267 | { |
268 | int ret_val; | 268 | int ret_val = 0; |
269 | struct nlattr *nla_a; | 269 | struct nlattr *nla_a; |
270 | struct nlattr *nla_b; | 270 | struct nlattr *nla_b; |
271 | struct netlbl_af4list *iter4; | 271 | struct netlbl_af4list *iter4; |