Template
1
0
mirror of https://github.com/bol-van/zapret2.git synced 2026-03-13 22:03:09 +00:00

nfqws2: 1ULL in proto/payload

This commit is contained in:
bol-van
2026-02-06 11:31:47 +03:00
parent c5ecc0493d
commit 6299a46ab7
4 changed files with 8 additions and 8 deletions

View File

@@ -1053,7 +1053,7 @@ static int luacall_execution_plan(lua_State *L)
{
for (pl=0 ; pl<L7P_LAST ; pl++)
{
if (func->payload_type & (1<<pl))
if (func->payload_type & (1ULL<<pl))
{
if ((pls = l7payload_str(pl)))
{

View File

@@ -1097,7 +1097,7 @@ static bool parse_l7_list(char *opt, uint64_t *l7)
break;
}
else
*l7 |= 1<<proto;
*l7 |= 1ULL<<proto;
if (e) *e++ = c;
p = e;
@@ -1125,7 +1125,7 @@ static bool parse_l7p_list(char *opt, uint64_t *l7p)
break;
}
else
*l7p |= 1<<payload;
*l7p |= 1ULL<<payload;
if (e) *e++ = c;
p = e;
@@ -1379,7 +1379,7 @@ static void LuaDesyncDebug(struct desync_profile *dp, const char *entity)
if (func->payload_type)
{
for(i=0;i<L7P_LAST;i++)
if (func->payload_type & (1<<i))
if (func->payload_type & (1ULL<<i))
DLOG(" %s", l7payload_str(i));
}
else

View File

@@ -594,7 +594,7 @@ void init_params(struct params_s *params)
LIST_INIT(&params->blobs);
LIST_INIT(&params->lua_init_scripts);
params->reasm_payload_disable = params->payload_disable = 1<<L7P_NONE;
params->reasm_payload_disable = params->payload_disable = 1ULL<<L7P_NONE;
#ifdef __CYGWIN__
LIST_INIT(&params->ssid_filter);

View File

@@ -210,10 +210,10 @@ int getmaxcap(void)
}
bool dropcaps(void)
{
uint64_t caps = (1<<CAP_NET_ADMIN)|(1<<CAP_NET_RAW);
uint64_t caps = (1ULL<<CAP_NET_ADMIN)|(1ULL<<CAP_NET_RAW);
int maxcap = getmaxcap();
if (setpcap(caps|(1<<CAP_SETPCAP)))
if (setpcap(caps|(1ULL<<CAP_SETPCAP)))
{
for (int cap = 0; cap <= maxcap; cap++)
{
@@ -249,7 +249,7 @@ bool can_drop_root(void)
{
#ifdef __linux__
// has some caps
return checkpcap((1<<CAP_SETUID)|(1<<CAP_SETGID));
return checkpcap((1ULL<<CAP_SETUID)|(1ULL<<CAP_SETGID));
#else
// effective root
return !geteuid();