mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
netfilter: xtables: provide invoked family value to extensions
By passing in the family through which extensions were invoked, a bit of data space can be reclaimed. The "family" member will be added to the parameter structures and the check functions be adjusted. Signed-off-by: Jan Engelhardt <[email protected]> Signed-off-by: Patrick McHardy <[email protected]>
This commit is contained in:
parent
a2df1648ba
commit
916a917dfe
7 changed files with 52 additions and 24 deletions
|
|
@ -55,9 +55,9 @@ static int ipt_init_target(struct ipt_entry_target *t, char *table, unsigned int
|
|||
par.target = target;
|
||||
par.targinfo = t->data;
|
||||
par.hook_mask = hook;
|
||||
par.family = NFPROTO_IPV4;
|
||||
|
||||
ret = xt_check_target(&par, NFPROTO_IPV4,
|
||||
t->u.target_size - sizeof(*t), 0, false);
|
||||
ret = xt_check_target(&par, t->u.target_size - sizeof(*t), 0, false);
|
||||
if (ret < 0) {
|
||||
module_put(t->u.kernel.target->me);
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Reference in a new issue