Disallow to use --no-ipv6 in kernel space

This commit is contained in:
Vadim Vetrov
2025-01-08 23:58:55 +03:00
parent 16ba8801c1
commit 37c8a798fd
2 changed files with 44 additions and 30 deletions

View File

@@ -478,7 +478,15 @@ int yparse_args(int argc, char *argv[]) {
#endif
break;
case OPT_NO_IPV6:
#ifndef KERNEL_SPACE
rep_config.use_ipv6 = 0;
#else
lgerr("--no-ipv6 argument is not available "
"in the kernel module. "
"If you want to disable ipv6, compile with "
"make kmake EXTRA_CFLAGS=\"-DNO_IPV6\".");
goto invalid_opt;
#endif
break;
case OPT_DAEMONIZE:
rep_config.daemonize = 1;