release_sock(sk);
if (copied + copied_syn)
- uid_stat_tcp_snd(current_uid(), copied + copied_syn);
+ uid_stat_tcp_snd(from_kuid(&init_user_ns, current_uid()),
+ copied + copied_syn);
return copied + copied_syn;
do_fault:
if (copied > 0) {
tcp_recv_skb(sk, seq, &offset);
tcp_cleanup_rbuf(sk, copied);
- uid_stat_tcp_rcv(current_uid(), copied);
+ uid_stat_tcp_rcv(from_kuid(&init_user_ns, current_uid()),
+ copied);
}
return copied;
}
release_sock(sk);
if (copied > 0)
- uid_stat_tcp_rcv(current_uid(), copied);
+ uid_stat_tcp_rcv(from_kuid(&init_user_ns, current_uid()),
+ copied);
return copied;
out:
recv_urg:
err = tcp_recv_urg(sk, msg, len, flags);
if (err > 0)
- uid_stat_tcp_rcv(current_uid(), err);
+ uid_stat_tcp_rcv(from_kuid(&init_user_ns, current_uid()),
+ err);
goto out;
recv_sndq:
struct in_addr *in;
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
- struct in6_addr *in6;
+ struct in6_addr *in6 = NULL;
#endif
if (family == AF_INET) {
in = &((struct sockaddr_in *)addr)->sin_addr;
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
if (family == AF_INET6) {
struct in6_addr *s6;
- if (!inet->pinet6)
- continue;
- s6 = &inet->pinet6->rcv_saddr;
+ s6 = &sk->sk_v6_rcv_saddr;
if (ipv6_addr_type(s6) == IPV6_ADDR_MAPPED)
continue;
static struct proc_dir_entry *proc_xt_quota;
static unsigned int quota_list_perms = S_IRUGO | S_IWUSR;
-static unsigned int quota_list_uid = 0;
-static unsigned int quota_list_gid = 0;
+static kuid_t quota_list_uid = KUIDT_INIT(0);
+static kgid_t quota_list_gid = KGIDT_INIT(0);
module_param_named(perms, quota_list_perms, uint, S_IRUGO | S_IWUSR);
-module_param_named(uid, quota_list_uid, uint, S_IRUGO | S_IWUSR);
-module_param_named(gid, quota_list_gid, uint, S_IRUGO | S_IWUSR);
-
#ifdef CONFIG_NETFILTER_XT_MATCH_QUOTA2_LOG
static void quota2_log(unsigned int hooknum,