diff options
author | Florian Westphal <fwestphal@astaro.com> | 2010-02-15 18:17:10 +0100 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2010-02-15 18:17:10 +0100 |
commit | 3e5e524ffb5fcf2447eb5dd9f8e54ad22dd9baa7 (patch) | |
tree | a78b8d92a63dd217e114a02e1ff0902e5e23cc41 /include/linux/netfilter | |
parent | fc0e3df4f00a5f62c2f2fce84bf496136b58c474 (diff) | |
download | kernel_samsung_espresso10-3e5e524ffb5fcf2447eb5dd9f8e54ad22dd9baa7.zip kernel_samsung_espresso10-3e5e524ffb5fcf2447eb5dd9f8e54ad22dd9baa7.tar.gz kernel_samsung_espresso10-3e5e524ffb5fcf2447eb5dd9f8e54ad22dd9baa7.tar.bz2 |
netfilter: CONFIG_COMPAT: allow delta to exceed 32767
with 32 bit userland and 64 bit kernels, it is unlikely but possible
that insertion of new rules fails even tough there are only about 2000
iptables rules.
This happens because the compat delta is using a short int.
Easily reproducible via "iptables -m limit" ; after about 2050
rules inserting new ones fails with -ELOOP.
Note that compat_delta included 2 bytes of padding on x86_64, so
structure size remains the same.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'include/linux/netfilter')
-rw-r--r-- | include/linux/netfilter/x_tables.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index c61758f..a18119f 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h @@ -588,7 +588,7 @@ extern void xt_compat_unlock(u_int8_t af); extern int xt_compat_add_offset(u_int8_t af, unsigned int offset, short delta); extern void xt_compat_flush_offsets(u_int8_t af); -extern short xt_compat_calc_jump(u_int8_t af, unsigned int offset); +extern int xt_compat_calc_jump(u_int8_t af, unsigned int offset); extern int xt_compat_match_offset(const struct xt_match *match); extern int xt_compat_match_from_user(struct xt_entry_match *m, |