Set l7 proto with l4

#251
This commit is contained in:
ruti 2025-01-18 11:51:11 +03:00
parent 8568eb16b6
commit 7b46e5958f
2 changed files with 5 additions and 2 deletions

View File

@ -226,6 +226,9 @@ static bool check_l34(struct desync_params *dp, int st, const union sockaddr_u *
if ((dp->proto & IS_UDP) && (st != SOCK_DGRAM)) {
return 0;
}
if ((dp->proto & IS_TCP) && (st != SOCK_STREAM)) {
return 0;
}
if (dp->proto & IS_IPV4) {
static const char *pat = "\0\0\0\0\0\0\0\0\0\0\xff\xff";

4
main.c
View File

@ -823,10 +823,10 @@ int main(int argc, char **argv)
while (end && !invalid) {
switch (*end) {
case 't':
dp->proto |= IS_HTTPS;
dp->proto |= IS_TCP | IS_HTTPS;
break;
case 'h':
dp->proto |= IS_HTTP;
dp->proto |= IS_TCP | IS_HTTP;
break;
case 'u':
dp->proto |= IS_UDP;