]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'master' of git://git.infradead.org/users/pcmoore/lblnet-2.6
authorDavid S. Miller <davem@davemloft.net>
Fri, 31 Oct 2008 06:57:40 +0000 (23:57 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 31 Oct 2008 06:57:40 +0000 (23:57 -0700)
net/ipv4/cipso_ipv4.c
net/netlabel/netlabel_addrlist.c
net/netlabel/netlabel_addrlist.h
net/netlabel/netlabel_mgmt.c

index 490e035c6d90d231aee5514ac8d4a3f262ef0a4d..2e78f6bd97756db7920367e5fe07ce23e6cd6eb7 100644 (file)
@@ -2063,9 +2063,10 @@ int cipso_v4_skbuff_setattr(struct sk_buff *skb,
        u32 opt_len;
        int len_delta;
 
-       buf_len = cipso_v4_genopt(buf, buf_len, doi_def, secattr);
-       if (buf_len < 0)
-               return buf_len;
+       ret_val = cipso_v4_genopt(buf, buf_len, doi_def, secattr);
+       if (ret_val < 0)
+               return ret_val;
+       buf_len = ret_val;
        opt_len = (buf_len + 3) & ~3;
 
        /* we overwrite any existing options to ensure that we have enough
index b0925a3033534f7a69d52ea4adb6f03f57892648..249f6b92f153b675cb7895b0b3b4f57b8fb74799 100644 (file)
@@ -315,6 +315,7 @@ struct netlbl_af6list *netlbl_af6list_remove(const struct in6_addr *addr,
  * Audit Helper Functions
  */
 
+#ifdef CONFIG_AUDIT
 /**
  * netlbl_af4list_audit_addr - Audit an IPv4 address
  * @audit_buf: audit buffer
@@ -386,3 +387,4 @@ void netlbl_af6list_audit_addr(struct audit_buffer *audit_buf,
        }
 }
 #endif /* IPv6 */
+#endif /* CONFIG_AUDIT */
index 0242bead405f953bb9f9d6810aff63bfad75c8ce..07ae7fd82be1ee2531eb8bc015d2be42653e701c 100644 (file)
@@ -120,9 +120,19 @@ struct netlbl_af4list *netlbl_af4list_search(__be32 addr,
 struct netlbl_af4list *netlbl_af4list_search_exact(__be32 addr,
                                                   __be32 mask,
                                                   struct list_head *head);
+
+#ifdef CONFIG_AUDIT
 void netlbl_af4list_audit_addr(struct audit_buffer *audit_buf,
                               int src, const char *dev,
                               __be32 addr, __be32 mask);
+#else
+static inline void netlbl_af4list_audit_addr(struct audit_buffer *audit_buf,
+                                            int src, const char *dev,
+                                            __be32 addr, __be32 mask)
+{
+       return;
+}
+#endif
 
 #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
 
@@ -179,11 +189,23 @@ struct netlbl_af6list *netlbl_af6list_search(const struct in6_addr *addr,
 struct netlbl_af6list *netlbl_af6list_search_exact(const struct in6_addr *addr,
                                                   const struct in6_addr *mask,
                                                   struct list_head *head);
+
+#ifdef CONFIG_AUDIT
 void netlbl_af6list_audit_addr(struct audit_buffer *audit_buf,
                               int src,
                               const char *dev,
                               const struct in6_addr *addr,
                               const struct in6_addr *mask);
+#else
+static inline void netlbl_af6list_audit_addr(struct audit_buffer *audit_buf,
+                                            int src,
+                                            const char *dev,
+                                            const struct in6_addr *addr,
+                                            const struct in6_addr *mask)
+{
+       return;
+}
+#endif
 #endif /* IPV6 */
 
 #endif
index ee769ecaa13cf149f137a8a88b3606673b325cee..0a0ef17b2a401bf4afb1385b5eb5173dd0c38d7b 100644 (file)
@@ -265,7 +265,7 @@ add_failure:
 static int netlbl_mgmt_listentry(struct sk_buff *skb,
                                 struct netlbl_dom_map *entry)
 {
-       int ret_val;
+       int ret_val = 0;
        struct nlattr *nla_a;
        struct nlattr *nla_b;
        struct netlbl_af4list *iter4;