shortcut-fe: Backward compatible with kernel 4.9
This commit is contained in:
parent
c65e7232e5
commit
3cddb450f3
@ -1049,7 +1049,11 @@ static int __init sfe_cm_init(void)
|
||||
*/
|
||||
#ifdef CONFIG_NF_CONNTRACK_EVENTS
|
||||
#ifdef CONFIG_NF_CONNTRACK_CHAIN_EVENTS
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0))
|
||||
(void)nf_conntrack_register_chain_notifier(&init_net, &sfe_cm_conntrack_notifier);
|
||||
#else
|
||||
(void)nf_conntrack_register_notifier(&init_net, &sfe_cm_conntrack_notifier);
|
||||
#endif /*KERNEL_VERSION(4, 14, 0)*/
|
||||
#else
|
||||
result = nf_conntrack_register_notifier(&init_net, &sfe_cm_conntrack_notifier);
|
||||
if (result < 0) {
|
||||
@ -1124,7 +1128,11 @@ static void __exit sfe_cm_exit(void)
|
||||
|
||||
#ifdef CONFIG_NF_CONNTRACK_EVENTS
|
||||
#ifdef CONFIG_NF_CONNTRACK_CHAIN_EVENTS
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0))
|
||||
nf_conntrack_unregister_chain_notifier(&init_net, &sfe_cm_conntrack_notifier);
|
||||
#else
|
||||
nf_conntrack_unregister_notifier(&init_net, &sfe_cm_conntrack_notifier);
|
||||
#endif /*KERNEL_VERSION(4, 14, 0)*/
|
||||
#else
|
||||
nf_conntrack_unregister_notifier(&init_net, &sfe_cm_conntrack_notifier);
|
||||
#endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user