gianfar: fix signedness issue
[linux-2.6.git] / security / lsm_audit.c
index 51bd0fd9c9f0b016a40cb3682bfc49a6fef8b053..908aa712816ac25bcb73fe22e6e704bd669d7566 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/types.h>
 #include <linux/stddef.h>
 #include <linux/kernel.h>
+#include <linux/gfp.h>
 #include <linux/fs.h>
 #include <linux/init.h>
 #include <net/sock.h>
@@ -220,7 +221,7 @@ static void dump_common_audit_data(struct audit_buffer *ab,
        }
 
        switch (a->type) {
-       case LSM_AUDIT_NO_AUDIT:
+       case LSM_AUDIT_DATA_NONE:
                return;
        case LSM_AUDIT_DATA_IPC:
                audit_log_format(ab, " key=%d ", a->u.ipc_id);
@@ -273,11 +274,11 @@ static void dump_common_audit_data(struct audit_buffer *ab,
                        case AF_INET: {
                                struct inet_sock *inet = inet_sk(sk);
 
-                               print_ipv4_addr(ab, inet->rcv_saddr,
-                                               inet->sport,
+                               print_ipv4_addr(ab, inet->inet_rcv_saddr,
+                                               inet->inet_sport,
                                                "laddr", "lport");
-                               print_ipv4_addr(ab, inet->daddr,
-                                               inet->dport,
+                               print_ipv4_addr(ab, inet->inet_daddr,
+                                               inet->inet_dport,
                                                "faddr", "fport");
                                break;
                        }
@@ -286,10 +287,10 @@ static void dump_common_audit_data(struct audit_buffer *ab,
                                struct ipv6_pinfo *inet6 = inet6_sk(sk);
 
                                print_ipv6_addr(ab, &inet6->rcv_saddr,
-                                               inet->sport,
+                                               inet->inet_sport,
                                                "laddr", "lport");
                                print_ipv6_addr(ab, &inet6->daddr,
-                                               inet->dport,
+                                               inet->inet_dport,
                                                "faddr", "fport");
                                break;
                        }