Module for kernel works now on local machine.

SEG2_DELAY is not implemented yet.
This commit is contained in:
Vadim Vetrov
2024-08-04 15:55:07 +03:00
parent 62a5627c50
commit 8bb2bb28d2
7 changed files with 168 additions and 139 deletions

View File

@@ -110,13 +110,13 @@ static int open_raw_socket(void) {
return -1;
}
int one = 1;
const int *val = &one;
if (setsockopt(config.rawsocket, IPPROTO_IP, IP_HDRINCL, val, sizeof(one)) < 0)
{
fprintf(stderr, "setsockopt(IP_HDRINCL, 1) failed\n");
return -1;
}
// int one = 1;
// const int *val = &one;
// if (setsockopt(config.rawsocket, IPPROTO_IP, IP_HDRINCL, val, sizeof(one)) < 0)
// {
// fprintf(stderr, "setsockopt(IP_HDRINCL, 1) failed\n");
// return -1;
// }
int mark = RAWSOCKET_MARK;
if (setsockopt(config.rawsocket, SOL_SOCKET, SO_MARK, &mark, sizeof(mark)) < 0)