You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.1 KiB

  1. --- a/src/linux/xt_coova.c
  2. +++ b/src/linux/xt_coova.c
  3. @@ -91,8 +91,12 @@ static DEFINE_MUTEX(coova_mutex);
  4. #ifdef CONFIG_PROC_FS
  5. static struct proc_dir_entry *coova_proc_dir;
  6. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0)
  7. +static const struct proc_ops coova_old_fops, coova_mt_fops;
  8. +#else
  9. static const struct file_operations coova_old_fops, coova_mt_fops;
  10. #endif
  11. +#endif
  12. static u_int32_t hash_rnd;
  13. static bool hash_rnd_initted;
  14. @@ -577,6 +581,14 @@ coova_mt_proc_write(struct file *file, c
  15. return size + 1;
  16. }
  17. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0)
  18. +static const struct proc_ops coova_mt_fops = {
  19. + .proc_open = coova_seq_open,
  20. + .proc_read = seq_read,
  21. + .proc_write = coova_mt_proc_write,
  22. + .proc_release = seq_release_private,
  23. +};
  24. +#else
  25. static const struct file_operations coova_mt_fops = {
  26. .open = coova_seq_open,
  27. .read = seq_read,
  28. @@ -584,6 +596,7 @@ static const struct file_operations coov
  29. .release = seq_release_private,
  30. .owner = THIS_MODULE,
  31. };
  32. +#endif
  33. #endif /* CONFIG_PROC_FS */
  34. static struct xt_match coova_mt_reg[] __read_mostly = {