Skip to content

BOUNTY offered #250

@shimmi2

Description

@shimmi2

for making it compattilbe with kernel 6.17.7 and similar. This also covering #249, sorry, i divided it into separate issue.

First error, mented in prev issue, I corrected by linking to the working path

ipt_NETFLOW.c:71:10: fatal error: asm/unaligned.h: No such file or directory
   71 | #include <asm/unaligned.h>

But after then I lost patience. Is there someone Who want to earn 100 Euro, maybee 200 if you convince me how much work it is :)? AI is still week for this.

email me to [email protected]

make[2]: Entering directory '/usr/src/ipt-netflow/ipt-netflow'
  CC [M]  ipt_NETFLOW.o
In file included from ipt_NETFLOW.c:77:
compat.h:219:15: warning: no previous prototype for ‘timeval_to_jiffies’ [-Wmissing-prototypes]
  219 | unsigned long timeval_to_jiffies(const struct timeval *tv)
      |               ^~~~~~~~~~~~~~~~~~
compat.h:384:20: warning: no previous prototype for ‘compat_hex_to_bin’ [-Wmissing-prototypes]
  384 | #define hex_to_bin compat_hex_to_bin
      |                    ^~~~~~~~~~~~~~~~~
compat.h:386:5: note: in expansion of macro ‘hex_to_bin’
  386 | int hex_to_bin(char ch)
      |     ^~~~~~~~~~
compat.h:716:20: warning: no previous prototype for ‘strtoul’ [-Wmissing-prototypes]
  716 | unsigned long long strtoul(const char *cp, char **endp, unsigned int base)
      |                    ^~~~~~~
ipt_NETFLOW.c:1807:35: error: initialization of ‘int (*)(const struct ctl_table *, int,  void *, size_t *, loff_t *)’ {aka ‘int (*)(const struct ctl_table *, int,  void *, long unsigned int *, long long int *)’} from incompatible pointer type ‘int (*)(struct ctl_table *, int,  void *, size_t *, loff_t *)’ {aka ‘int (*)(struct ctl_table *, int,  void *, long unsigned int *, long long int *)’} [-Werror=incompatible-pointer-types]
 1807 |                 .proc_handler   = &hsize_procctl,
      |                                   ^
ipt_NETFLOW.c:1807:35: note: (near initialization for ‘netflow_sysctl_table[3].proc_handler’)
ipt_NETFLOW.c:1813:35: error: initialization of ‘int (*)(const struct ctl_table *, int,  void *, size_t *, loff_t *)’ {aka ‘int (*)(const struct ctl_table *, int,  void *, long unsigned int *, long long int *)’} from incompatible pointer type ‘int (*)(struct ctl_table *, int,  void *, size_t *, loff_t *)’ {aka ‘int (*)(struct ctl_table *, int,  void *, long unsigned int *, long long int *)’} [-Werror=incompatible-pointer-types]
 1813 |                 .proc_handler   = &sndbuf_procctl,
      |                                   ^
ipt_NETFLOW.c:1813:35: note: (near initialization for ‘netflow_sysctl_table[4].proc_handler’)
ipt_NETFLOW.c:1820:35: error: initialization of ‘int (*)(const struct ctl_table *, int,  void *, size_t *, loff_t *)’ {aka ‘int (*)(const struct ctl_table *, int,  void *, long unsigned int *, long long int *)’} from incompatible pointer type ‘int (*)(struct ctl_table *, int,  void *, size_t *, loff_t *)’ {aka ‘int (*)(struct ctl_table *, int,  void *, long unsigned int *, long long int *)’} [-Werror=incompatible-pointer-types]
 1820 |                 .proc_handler   = &destination_procctl,
      |                                   ^
ipt_NETFLOW.c:1820:35: note: (near initialization for ‘netflow_sysctl_table[5].proc_handler’)
ipt_NETFLOW.c:1842:35: error: initialization of ‘int (*)(const struct ctl_table *, int,  void *, size_t *, loff_t *)’ {aka ‘int (*)(const struct ctl_table *, int,  void *, long unsigned int *, long long int *)’} from incompatible pointer type ‘int (*)(struct ctl_table *, int,  void *, size_t *, loff_t *)’ {aka ‘int (*)(struct ctl_table *, int,  void *, long unsigned int *, long long int *)’} [-Werror=incompatible-pointer-types]
 1842 |                 .proc_handler   = &flush_procctl,
      |                                   ^
ipt_NETFLOW.c:1842:35: note: (near initialization for ‘netflow_sysctl_table[7].proc_handler’)
ipt_NETFLOW.c:1848:35: error: initialization of ‘int (*)(const struct ctl_table *, int,  void *, size_t *, loff_t *)’ {aka ‘int (*)(const struct ctl_table *, int,  void *, long unsigned int *, long long int *)’} from incompatible pointer type ‘int (*)(struct ctl_table *, int,  void *, size_t *, loff_t *)’ {aka ‘int (*)(struct ctl_table *, int,  void *, long unsigned int *, long long int *)’} [-Werror=incompatible-pointer-types]
 1848 |                 .proc_handler   = &protocol_procctl,
      |                                   ^
ipt_NETFLOW.c:1848:35: note: (near initialization for ‘netflow_sysctl_table[8].proc_handler’)
ipt_NETFLOW.c:3538:20: error: conflicting types for ‘put_unaligned_be24’; have ‘void(u32,  unsigned char *)’ {aka ‘void(unsigned int,  unsigned char *)’}
 3538 | static inline void put_unaligned_be24(u32 val, unsigned char *p)
      |                    ^~~~~~~~~~~~~~~~~~
In file included from /usr/src/linux-6.17.7/include/linux/jhash.h:27,
                 from /usr/src/linux-6.17.7/include/net/inet_sock.h:18,
                 from /usr/src/linux-6.17.7/include/linux/udp.h:16,
                 from ipt_NETFLOW.c:33:
/usr/src/linux-6.17.7/include/linux/unaligned.h:103:20: note: previous definition of ‘put_unaligned_be24’ with type ‘void(const u32,  void *)’ {aka ‘void(const unsigned int,  void *)’}
  103 | static inline void put_unaligned_be24(const u32 val, void *p)
      |                    ^~~~~~~~~~~~~~~~~~
ipt_NETFLOW.c: In function ‘ethtool_drvinfo’:
ipt_NETFLOW.c:4090:17: error: implicit declaration of function ‘strlcpy’; did you mean ‘strncpy’? [-Werror=implicit-function-declaration]
 4090 |                 strlcpy(info.driver, dev->dev.parent->driver->name, sizeof(info.driver));
      |                 ^~~~~~~
      |                 strncpy
ipt_NETFLOW.c: In function ‘ipt_netflow_init’:
ipt_NETFLOW.c:5763:9: error: implicit declaration of function ‘del_timer_sync’; did you mean ‘dev_mc_sync’? [-Werror=implicit-function-declaration]
 5763 |         del_timer_sync(&rate_timer);
      |         ^~~~~~~~~~~~~~
      |         dev_mc_sync


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions