mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-06 20:55:13 +02:00
build: support for Linux 4.10
Commit 613dbd95723aee7abd16860745691b6c7bda20dc (netfilter: x_tables: move hook state into xt_action_param structure) changes the struct xt_action_param, accommodate for it. Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This commit is contained in:

committed by
Jan Engelhardt

parent
db234c30cd
commit
a8af97b8fa
@@ -82,11 +82,15 @@ static inline void proc_remove(struct proc_dir_entry *de)
|
||||
|
||||
static inline struct net *par_net(const struct xt_action_param *par)
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
|
||||
return par->state->net;
|
||||
#else
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0)
|
||||
return par->net;
|
||||
#else
|
||||
return dev_net((par->in != NULL) ? par->in : par->out);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* _XTABLES_COMPAT_H */
|
||||
|
Reference in New Issue
Block a user