blob: 875dabb5c016ca454999d0e87ff364726644a207 [file] [log] [blame]
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Todd Kjos <tkjos@google.com>
Date: Tue, 17 Aug 2021 14:23:28 -0700
Subject: ANDROID: xt_quota2: set usersize in xt_match registration object
Explicitly set what is visible to userspace
Bug: 196046570
Test: passed netd test suites
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: Iacec0ef8ae290e01f1b60508d8abcd40a3653c83
---
net/netfilter/xt_quota2.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/netfilter/xt_quota2.c b/net/netfilter/xt_quota2.c
--- a/net/netfilter/xt_quota2.c
+++ b/net/netfilter/xt_quota2.c
@@ -343,6 +343,7 @@ static struct xt_match quota_mt2_reg[] __read_mostly = {
.match = quota_mt2,
.destroy = quota_mt2_destroy,
.matchsize = sizeof(struct xt_quota_mtinfo2),
+ .usersize = offsetof(struct xt_quota_mtinfo2, master),
.me = THIS_MODULE,
},
{
@@ -353,6 +354,7 @@ static struct xt_match quota_mt2_reg[] __read_mostly = {
.match = quota_mt2,
.destroy = quota_mt2_destroy,
.matchsize = sizeof(struct xt_quota_mtinfo2),
+ .usersize = offsetof(struct xt_quota_mtinfo2, master),
.me = THIS_MODULE,
},
};