diff options
author | Alex Shi <alex.shi@linaro.org> | 2018-02-01 12:02:38 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2018-02-01 12:02:38 +0800 |
commit | 59e35359ec360b74e9013ccab84c19ce53db38f9 (patch) | |
tree | f6c5cca3189d2140f23e7a71ee3f167c7e6f748e /include/linux/netfilter/x_tables.h | |
parent | c210bc406de6a7993b8d7f30c28436be80de7694 (diff) | |
parent | a40f2a595adfe0be6ced06fdb4c4a24ae3291a91 (diff) |
Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-androidlsk-v4.4-18.02-android
Diffstat (limited to 'include/linux/netfilter/x_tables.h')
-rw-r--r-- | include/linux/netfilter/x_tables.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index 04078e8a4803..d6c53fce006b 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h @@ -243,6 +243,10 @@ int xt_check_entry_offsets(const void *base, const char *elems, unsigned int target_offset, unsigned int next_offset); +unsigned int *xt_alloc_entry_offsets(unsigned int size); +bool xt_find_jump_offset(const unsigned int *offsets, + unsigned int target, unsigned int size); + int xt_check_match(struct xt_mtchk_param *, unsigned int size, u_int8_t proto, bool inv_proto); int xt_check_target(struct xt_tgchk_param *, unsigned int size, u_int8_t proto, @@ -377,16 +381,16 @@ static inline unsigned long ifname_compare_aligned(const char *_a, * allows us to return 0 for single core systems without forcing * callers to deal with SMP vs. NONSMP issues. */ -static inline u64 xt_percpu_counter_alloc(void) +static inline unsigned long xt_percpu_counter_alloc(void) { if (nr_cpu_ids > 1) { void __percpu *res = __alloc_percpu(sizeof(struct xt_counters), sizeof(struct xt_counters)); if (res == NULL) - return (u64) -ENOMEM; + return -ENOMEM; - return (u64) (__force unsigned long) res; + return (__force unsigned long) res; } return 0; |