mirror of
https://github.com/bol-van/zapret.git
synced 2024-11-15 02:58:34 +05:00
nfqws,tpws: fix invalid port filter message
This commit is contained in:
parent
2452a529eb
commit
1a722c1b78
@ -673,6 +673,7 @@ static bool parse_pf_list(char *opt, struct port_filters_head *pfl)
|
|||||||
{
|
{
|
||||||
char *e,*p,c;
|
char *e,*p,c;
|
||||||
port_filter pf;
|
port_filter pf;
|
||||||
|
bool b;
|
||||||
|
|
||||||
for (p=opt ; p ; )
|
for (p=opt ; p ; )
|
||||||
{
|
{
|
||||||
@ -682,9 +683,10 @@ static bool parse_pf_list(char *opt, struct port_filters_head *pfl)
|
|||||||
*e=0;
|
*e=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pf_parse(p,&pf) || !port_filter_add(pfl,&pf)) return false;
|
b = pf_parse(p,&pf) && port_filter_add(pfl,&pf);
|
||||||
|
|
||||||
if (e) *e++=c;
|
if (e) *e++=c;
|
||||||
|
if (!b) return false;
|
||||||
|
|
||||||
p = e;
|
p = e;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -335,6 +335,7 @@ static bool parse_pf_list(char *opt, struct port_filters_head *pfl)
|
|||||||
{
|
{
|
||||||
char *e,*p,c;
|
char *e,*p,c;
|
||||||
port_filter pf;
|
port_filter pf;
|
||||||
|
bool b;
|
||||||
|
|
||||||
for (p=opt ; p ; )
|
for (p=opt ; p ; )
|
||||||
{
|
{
|
||||||
@ -344,9 +345,10 @@ static bool parse_pf_list(char *opt, struct port_filters_head *pfl)
|
|||||||
*e=0;
|
*e=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pf_parse(p,&pf) || !port_filter_add(pfl,&pf)) return false;
|
b = pf_parse(p,&pf) && port_filter_add(pfl,&pf);
|
||||||
|
|
||||||
if (e) *e++=c;
|
if (e) *e++=c;
|
||||||
|
if (!b) return false;
|
||||||
|
|
||||||
p = e;
|
p = e;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user