[IPV4]: ip_route_input() annotations
[pandora-kernel.git] / include / net / route.h
index c4a0686..9cfa670 100644 (file)
@@ -32,6 +32,7 @@
 #include <linux/route.h>
 #include <linux/ip.h>
 #include <linux/cache.h>
+#include <linux/security.h>
 
 #ifndef __KERNEL__
 #warning This file is not supposed to be used outside of kernel.
@@ -115,7 +116,7 @@ extern void         rt_cache_flush(int how);
 extern int             __ip_route_output_key(struct rtable **, const struct flowi *flp);
 extern int             ip_route_output_key(struct rtable **, struct flowi *flp);
 extern int             ip_route_output_flow(struct rtable **rp, struct flowi *flp, struct sock *sk, int flags);
-extern int             ip_route_input(struct sk_buff*, u32 dst, u32 src, u8 tos, struct net_device *devin);
+extern int             ip_route_input(struct sk_buff*, __be32 dst, __be32 src, u8 tos, struct net_device *devin);
 extern unsigned short  ip_rt_frag_needed(struct iphdr *iph, unsigned short new_mtu);
 extern void            ip_rt_send_redirect(struct sk_buff *skb);
 
@@ -166,6 +167,7 @@ static inline int ip_route_connect(struct rtable **rp, u32 dst,
                ip_rt_put(*rp);
                *rp = NULL;
        }
+       security_sk_classify_flow(sk, &fl);
        return ip_route_output_flow(rp, &fl, sk, 0);
 }
 
@@ -182,6 +184,7 @@ static inline int ip_route_newports(struct rtable **rp, u8 protocol,
                fl.proto = protocol;
                ip_rt_put(*rp);
                *rp = NULL;
+               security_sk_classify_flow(sk, &fl);
                return ip_route_output_flow(rp, &fl, sk, 0);
        }
        return 0;