netfilter: xt_qtaguid: xt_socket: build fixes
authorAmit Pundir <amit.pundir@linaro.org>
Mon, 6 Jul 2015 18:58:49 +0000 (00:28 +0530)
committerJohn Stultz <john.stultz@linaro.org>
Tue, 16 Feb 2016 21:51:40 +0000 (13:51 -0800)
Add missing header <linux/miscdevice.h> and use
xt_socket_lookup_slow_v* instead of xt_socket_get*_sk
in xt_qtaguid.c.

Fix xt_socket_lookup_slow_v* functions in xt_socket.c
and declare them in xt_socket.h

Change-Id: I55819b2d4ffa82a2be20995c87d28fb5cc77b5ba
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
include/uapi/linux/netfilter/xt_socket.h
net/netfilter/xt_qtaguid.c

index ac645e69716f56de44707efb68b1f0301c33297f..15b4c1cf99bb56c65e77a0e4ae82b80c10fa3683 100644 (file)
@@ -26,9 +26,9 @@ struct xt_socket_mtinfo3 {
                           | XT_SOCKET_NOWILDCARD \
                           | XT_SOCKET_RESTORESKMARK)
 
-struct sock *xt_socket_get4_sk(const struct sk_buff *skb,
-                              struct xt_action_param *par);
-struct sock *xt_socket_get6_sk(const struct sk_buff *skb,
-                              struct xt_action_param *par);
+struct sock *xt_socket_lookup_slow_v4(const struct sk_buff *skb,
+                               const struct net_device *indev);
+struct sock *xt_socket_lookup_slow_v6(const struct sk_buff *skb,
+                               const struct net_device *indev);
 
 #endif /* _XT_SOCKET_H */
index 2f9784c1e692e983213457de0defbd784724694d..90b2c6aac7d85b0af0315a24cc3f036a9432acf8 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/file.h>
 #include <linux/inetdevice.h>
 #include <linux/module.h>
+#include <linux/miscdevice.h>
 #include <linux/netfilter/x_tables.h>
 #include <linux/netfilter/xt_qtaguid.h>
 #include <linux/ratelimit.h>
@@ -1588,10 +1589,10 @@ static struct sock *qtaguid_find_sk(const struct sk_buff *skb,
 
        switch (par->family) {
        case NFPROTO_IPV6:
-               sk = xt_socket_get6_sk(skb, par);
+               sk = xt_socket_lookup_slow_v6(skb, par->in);
                break;
        case NFPROTO_IPV4:
-               sk = xt_socket_get4_sk(skb, par);
+               sk = xt_socket_lookup_slow_v4(skb, par->in);
                break;
        default:
                return NULL;