aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2020-04-23 13:23:00 +0000
committerMaciej Zenczykowski <maze@google.com>2020-04-23 13:47:21 +0000
commit94d40f7a7230cb1e35e0c0c76b9fbc4276de700d (patch)
tree770ca42c9aa38c8c0e488cc7b4277be999d69701
parent7628ec22c1e35f7ed9bb6f634a312556a6ac2fbb (diff)
downloadplatform_external_iptables-94d40f7a7230cb1e35e0c0c76b9fbc4276de700d.tar.gz
platform_external_iptables-94d40f7a7230cb1e35e0c0c76b9fbc4276de700d.tar.bz2
platform_external_iptables-94d40f7a7230cb1e35e0c0c76b9fbc4276de700d.zip
libxt_quota - remove spurious divergence from upstream
This was added (along with other things) in: commit b65b9fe5096bd49a9ec2f0f6c2f23d274cfc88ee Author: JP Abgrall <jpa@google.com> Date: Wed May 18 20:19:39 2011 -0700 xtoptions + quota: parse and store 64bit values The xtables_strtoul() would cram a long long into a long. The parse_int would try to cram a UINT64 into a long. The quota_parse would just ignore whatever value was parsed. All the other pieces of this commit have vanished over time (presumably due to successive merges from upstream) and only this one line diff remains. However it is simply not necessary. This is because of the quota_opts structure already containing sufficient information for the core parsing routines to fill things in automatically. There's the type XTTYPE_UINT64, the request to store it XTOPT_PUT, and where to do so XTOPT_POINTER(struct xt_quotainfo, quota). static const struct xt_option_entry quota_opts[] = { {.name = "quota", .id = O_QUOTA, .type = XTTYPE_UINT64, .flags = XTOPT_MAND | XTOPT_INVERT | XTOPT_PUT, XTOPT_POINTER(struct xt_quota_info, quota)}, XTOPT_TABLEEND, }; The key upstream commit here is: commit 67db7615580f5c3490a39310f5adcb4e767ea6a8 Author: Jan Engelhardt <jengelh@medozas.de> Date: Fri May 20 16:01:18 2011 +0200 libxt_quota: readd missing XTOPT_PUT request which literally adds the '| XTOPT_PUT' up above. Test: builds, atest Bug: 143044679 Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: I76a8796ab062c7aaefa07bdaa2dbbaab246b6f80 Merged-In: I76a8796ab062c7aaefa07bdaa2dbbaab246b6f80
-rw-r--r--extensions/libxt_quota.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/extensions/libxt_quota.c b/extensions/libxt_quota.c
index 192cc717..bad77d23 100644
--- a/extensions/libxt_quota.c
+++ b/extensions/libxt_quota.c
@@ -48,7 +48,6 @@ static void quota_parse(struct xt_option_call *cb)
xtables_option_parse(cb);
if (cb->invert)
info->flags |= XT_QUOTA_INVERT;
- info->quota = cb->val.u64;
}
static int quota_xlate(struct xt_xlate *xl,