... | ... |
@@ -43,7 +43,7 @@ export makefile_defs |
43 | 43 |
VERSION = 0 |
44 | 44 |
PATCHLEVEL = 8 |
45 | 45 |
SUBLEVEL = 12 |
46 |
-EXTRAVERSION = dev-18-fifo |
|
46 |
+EXTRAVERSION = dev-19 |
|
47 | 47 |
|
48 | 48 |
RELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) |
49 | 49 |
OS = $(shell uname -s | sed -e s/SunOS/solaris/ | tr "[A-Z]" "[a-z]") |
... | ... |
@@ -7,6 +7,35 @@ $Id$ |
7 | 7 |
|
8 | 8 |
texops: |
9 | 9 |
- subst('s/re/repl/flags') support |
10 |
+core: |
|
11 |
+ - added switch to check the config file (-c) |
|
12 |
+ - changes: removed len_gt() and replaced with if (msg:len op number|max_len) |
|
13 |
+ - multiple operator support: ==, != for special operations (e.g myself, ip) |
|
14 |
+ ==, !=, ~= for strings |
|
15 |
+ ==, !=, >, <, >=, <= for integers |
|
16 |
+ - new config variables: |
|
17 |
+ advertised_address= ip | string |
|
18 |
+ address advertised in via and in the DST_* lumps (e.g RR) |
|
19 |
+ This is the default value, if empty (default) the socket |
|
20 |
+ address will be used. |
|
21 |
+ WARNING: - don't set it unless you know what you are doing |
|
22 |
+ (e.g. nat traversal) |
|
23 |
+ - you can set anything here, no check is made |
|
24 |
+ (e.g. foo.bar will be accepted even if |
|
25 |
+ foo.bar doesn't exist) |
|
26 |
+ advertised_port= no |
|
27 |
+ port advertised in via and in the DST_*lumps (e.g. RR) |
|
28 |
+ This is the default value, if empty (default) the socket |
|
29 |
+ port will be used. |
|
30 |
+ Same warnings as above. |
|
31 |
+ - new script commands: |
|
32 |
+ set_advertised_address(ip|string) |
|
33 |
+ same as advertised_address but it affects only the current message: |
|
34 |
+ Message host/lump address= the set_advertised one if |
|
35 |
+ present, else advertised_address else socket address. |
|
36 |
+ set_advertised_port(no) |
|
37 |
+ same as advertised_port but it affects only the current |
|
38 |
+ message; see set_advertised_address & s/address/port/g |
|
10 | 39 |
|
11 | 40 |
|
12 | 41 |
|
... | ... |
@@ -8,7 +8,7 @@ x update Makefile* from stable |
8 | 8 |
x update all package specs from stable |
9 | 9 |
- add BUG checks for fd > 0 && fd <= maxfd to all selects? |
10 | 10 |
x tcp_main_loop: BUG cases should "conitnue;" |
11 |
-- change len_gt into and expr (e.g msg:len). |
|
11 |
+x change len_gt into and expr (e.g msg:len). |
|
12 | 12 |
- sipit: uri == myself doesn't match tls port = 5061 |
13 | 13 |
- sipit: fix check_self & *_alias to work with tcp & tls |
14 | 14 |
x sipit: fix ipv6 references in check_self |
... | ... |
@@ -99,7 +99,7 @@ x forward to received= if present |
99 | 99 |
x add support for -u user and -g group (not only -u uid, -g uid) |
100 | 100 |
- change uid/gid after opening the sockets |
101 | 101 |
- exec improvments (add format strings to it) |
102 |
-- command line switch for checking the config file syntax |
|
102 |
+x command line switch for checking the config file syntax |
|
103 | 103 |
- config file version (a la sendmail) |
104 | 104 |
0 loop detection |
105 | 105 |
- cfg. file reload |
... | ... |
@@ -40,6 +40,7 @@ |
40 | 40 |
* 2003-07-06 more tls config. vars added: tls_method, tls_port_no (andrei) |
41 | 41 |
* 2003-10-02 added {,set_}advertised_{address,port} (andrei) |
42 | 42 |
* 2003-10-07 added hex and octal numbers support (andrei) |
43 |
+ * 2003-10-10 replaced len_gt w/ msg:len (andrei) |
|
43 | 44 |
*/ |
44 | 45 |
|
45 | 46 |
|
... | ... |
@@ -94,7 +95,6 @@ FORCE_RPORT "force_rport"|"add_rport" |
94 | 95 |
SETFLAG setflag |
95 | 96 |
RESETFLAG resetflag |
96 | 97 |
ISFLAGSET isflagset |
97 |
-LEN_GT len_gt |
|
98 | 98 |
SET_HOST "rewritehost"|"sethost"|"seth" |
99 | 99 |
SET_HOSTPORT "rewritehostport"|"sethostport"|"sethp" |
100 | 100 |
SET_USER "rewriteuser"|"setuser"|"setu" |
... | ... |
@@ -132,9 +132,15 @@ DSTPORT dst_port |
132 | 132 |
PROTO proto |
133 | 133 |
AF af |
134 | 134 |
MYSELF myself |
135 |
+MSGLEN "msg:len" |
|
135 | 136 |
/* operators */ |
136 | 137 |
EQUAL = |
137 | 138 |
EQUAL_T == |
139 |
+GT > |
|
140 |
+LT < |
|
141 |
+GTE >= |
|
142 |
+LTE <= |
|
143 |
+DIFF != |
|
138 | 144 |
MATCH =~ |
139 | 145 |
NOT !|"not" |
140 | 146 |
AND "and"|"&&"|"&" |
... | ... |
@@ -244,7 +250,7 @@ EAT_ABLE [\ \t\b\r] |
244 | 250 |
<INITIAL>{SETFLAG} { count(); yylval.strval=yytext; return SETFLAG; } |
245 | 251 |
<INITIAL>{RESETFLAG} { count(); yylval.strval=yytext; return RESETFLAG; } |
246 | 252 |
<INITIAL>{ISFLAGSET} { count(); yylval.strval=yytext; return ISFLAGSET; } |
247 |
-<INITIAL>{LEN_GT} { count(); yylval.strval=yytext; return LEN_GT; } |
|
253 |
+<INITIAL>{MSGLEN} { count(); yylval.strval=yytext; return MSGLEN; } |
|
248 | 254 |
<INITIAL>{ROUTE} { count(); yylval.strval=yytext; return ROUTE; } |
249 | 255 |
<INITIAL>{ROUTE_ONREPLY} { count(); yylval.strval=yytext; |
250 | 256 |
return ROUTE_ONREPLY; } |
... | ... |
@@ -336,6 +342,11 @@ EAT_ABLE [\ \t\b\r] |
336 | 342 |
|
337 | 343 |
<INITIAL>{EQUAL} { count(); return EQUAL; } |
338 | 344 |
<INITIAL>{EQUAL_T} { count(); return EQUAL_T; } |
345 |
+<INITIAL>{GT} { count(); return GT; } |
|
346 |
+<INITIAL>{LT} { count(); return LT; } |
|
347 |
+<INITIAL>{GTE} { count(); return GTE; } |
|
348 |
+<INITIAL>{LTE} { count(); return LTE; } |
|
349 |
+<INITIAL>{DIFF} { count(); return DIFF; } |
|
339 | 350 |
<INITIAL>{MATCH} { count(); return MATCH; } |
340 | 351 |
<INITIAL>{NOT} { count(); return NOT; } |
341 | 352 |
<INITIAL>{AND} { count(); return AND; } |
... | ... |
@@ -43,6 +43,9 @@ |
43 | 43 |
* require_certificate added (andrei) |
44 | 44 |
* 2003-07-06 more tls config. vars added: tls_method, tls_port_no (andrei) |
45 | 45 |
* 2003-10-02 added {,set_}advertised_{address,port} (andrei) |
46 |
+ * 2003-10-10 added <,>,<=,>=, != operators support |
|
47 |
+ * added msg:len (andrei) |
|
48 |
+ * 2003-10-11 if(){} doesn't require a ';' after it anymore (andrei) |
|
46 | 49 |
*/ |
47 | 50 |
|
48 | 51 |
|
... | ... |
@@ -148,7 +151,6 @@ void warn(char* s); |
148 | 151 |
%token SETFLAG |
149 | 152 |
%token RESETFLAG |
150 | 153 |
%token ISFLAGSET |
151 |
-%token LEN_GT |
|
152 | 154 |
%token METHOD |
153 | 155 |
%token URI |
154 | 156 |
%token SRCIP |
... | ... |
@@ -158,6 +160,7 @@ void warn(char* s); |
158 | 160 |
%token PROTO |
159 | 161 |
%token AF |
160 | 162 |
%token MYSELF |
163 |
+%token MSGLEN |
|
161 | 164 |
|
162 | 165 |
/* config vars. */ |
163 | 166 |
%token DEBUG |
... | ... |
@@ -211,6 +214,11 @@ void warn(char* s); |
211 | 214 |
/* operators */ |
212 | 215 |
%nonassoc EQUAL |
213 | 216 |
%nonassoc EQUAL_T |
217 |
+%nonassoc GT |
|
218 |
+%nonassoc LT |
|
219 |
+%nonassoc GTE |
|
220 |
+%nonassoc LTE |
|
221 |
+%nonassoc DIFF |
|
214 | 222 |
%nonassoc MATCH |
215 | 223 |
%left OR |
216 | 224 |
%left AND |
... | ... |
@@ -244,6 +252,7 @@ void warn(char* s); |
244 | 252 |
%type <strval> host |
245 | 253 |
%type <strval> listen_id |
246 | 254 |
%type <idlst> id_lst |
255 |
+%type <intval> equalop strop intop |
|
247 | 256 |
/*%type <route_el> rules; |
248 | 257 |
%type <route_el> rule; |
249 | 258 |
*/ |
... | ... |
@@ -285,14 +294,6 @@ listen_id: ip { tmp=ip_addr2a($1); |
285 | 294 |
} |
286 | 295 |
} |
287 | 296 |
} |
288 |
- | ID { $$=pkg_malloc(strlen($1)+1); |
|
289 |
- if ($$==0){ |
|
290 |
- LOG(L_CRIT, "ERROR: cfg. parser: out of " |
|
291 |
- "memory.\n"); |
|
292 |
- }else{ |
|
293 |
- strncpy($$, $1, strlen($1)+1); |
|
294 |
- } |
|
295 |
- } |
|
296 | 297 |
| STRING { $$=pkg_malloc(strlen($1)+1); |
297 | 298 |
if ($$==0){ |
298 | 299 |
LOG(L_CRIT, "ERROR: cfg. parser: out of " |
... | ... |
@@ -335,7 +336,7 @@ assign_stm: DEBUG EQUAL NUMBER { debug=$3; } |
335 | 336 |
| DEBUG EQUAL error { yyerror("number expected"); } |
336 | 337 |
| FORK EQUAL NUMBER { dont_fork= ! $3; } |
337 | 338 |
| FORK EQUAL error { yyerror("boolean value expected"); } |
338 |
- | LOGSTDERROR EQUAL NUMBER { log_stderr=$3; } |
|
339 |
+ | LOGSTDERROR EQUAL NUMBER { if (!config_check) log_stderr=$3; } |
|
339 | 340 |
| LOGSTDERROR EQUAL error { yyerror("boolean value expected"); } |
340 | 341 |
| DNS EQUAL NUMBER { received_dns|= ($3)?DO_DNS:0; } |
341 | 342 |
| DNS EQUAL error { yyerror("boolean value expected"); } |
... | ... |
@@ -700,117 +701,112 @@ exp: exp AND exp { $$=mk_exp(AND_OP, $1, $3); } |
700 | 701 |
| exp_elem { $$=$1; } |
701 | 702 |
; |
702 | 703 |
|
703 |
-exp_elem: METHOD EQUAL_T STRING {$$= mk_elem( EQUAL_OP, STRING_ST, |
|
704 |
+equalop: EQUAL_T {$$=EQUAL_OP; } |
|
705 |
+ | DIFF {$$=DIFF_OP; } |
|
706 |
+ ; |
|
707 |
+ |
|
708 |
+intop: equalop {$$=$1; } |
|
709 |
+ | GT {$$=GT_OP; } |
|
710 |
+ | LT {$$=LT_OP; } |
|
711 |
+ | GTE {$$=GTE_OP; } |
|
712 |
+ | LTE {$$=LTE_OP; } |
|
713 |
+ ; |
|
714 |
+ |
|
715 |
+strop: equalop {$$=$1; } |
|
716 |
+ | MATCH {$$=MATCH_OP; } |
|
717 |
+ ; |
|
718 |
+ |
|
719 |
+exp_elem: METHOD strop STRING {$$= mk_elem( $2, STRING_ST, |
|
704 | 720 |
METHOD_O, $3); |
705 | 721 |
} |
706 |
- | METHOD EQUAL_T ID {$$ = mk_elem( EQUAL_OP, STRING_ST, |
|
722 |
+ | METHOD strop ID {$$ = mk_elem( $2, STRING_ST, |
|
707 | 723 |
METHOD_O, $3); |
708 | 724 |
} |
709 |
- | METHOD EQUAL_T error { $$=0; yyerror("string expected"); } |
|
710 |
- | METHOD MATCH STRING {$$ = mk_elem( MATCH_OP, STRING_ST, |
|
711 |
- METHOD_O, $3); |
|
712 |
- } |
|
713 |
- | METHOD MATCH ID {$$ = mk_elem( MATCH_OP, STRING_ST, |
|
714 |
- METHOD_O, $3); |
|
715 |
- } |
|
716 |
- | METHOD MATCH error { $$=0; yyerror("string expected"); } |
|
725 |
+ | METHOD strop error { $$=0; yyerror("string expected"); } |
|
717 | 726 |
| METHOD error { $$=0; yyerror("invalid operator," |
718 |
- "== or =~ expected"); |
|
727 |
+ "== , !=, or =~ expected"); |
|
719 | 728 |
} |
720 |
- | URI EQUAL_T STRING {$$ = mk_elem( EQUAL_OP, STRING_ST, |
|
729 |
+ | URI strop STRING {$$ = mk_elem( $2, STRING_ST, |
|
721 | 730 |
URI_O, $3); |
722 | 731 |
} |
723 |
- | URI EQUAL_T ID {$$ = mk_elem( EQUAL_OP, STRING_ST, |
|
732 |
+ | URI strop host {$$ = mk_elem( $2, STRING_ST, |
|
724 | 733 |
URI_O, $3); |
725 | 734 |
} |
726 |
- | URI EQUAL_T MYSELF { $$=mk_elem( EQUAL_OP, MYSELF_ST, |
|
735 |
+ | URI equalop MYSELF { $$=mk_elem( $2, MYSELF_ST, |
|
727 | 736 |
URI_O, 0); |
728 | 737 |
} |
729 |
- | URI EQUAL_T error { $$=0; yyerror("string expected"); } |
|
730 |
- | URI MATCH STRING { $$=mk_elem( MATCH_OP, STRING_ST, |
|
731 |
- URI_O, $3); |
|
732 |
- } |
|
733 |
- | URI MATCH ID { $$=mk_elem( MATCH_OP, STRING_ST, |
|
734 |
- URI_O, $3); |
|
735 |
- } |
|
736 |
- | URI MATCH error { $$=0; yyerror("string expected"); } |
|
738 |
+ | URI strop error { $$=0; yyerror("string or MYSELF expected"); } |
|
737 | 739 |
| URI error { $$=0; yyerror("invalid operator," |
738 |
- " == or =~ expected"); |
|
740 |
+ " == , != or =~ expected"); |
|
739 | 741 |
} |
740 |
- | SRCPORT EQUAL_T NUMBER { $$=mk_elem( EQUAL_OP, NUMBER_ST, |
|
742 |
+ | SRCPORT intop NUMBER { $$=mk_elem( $2, NUMBER_ST, |
|
741 | 743 |
SRCPORT_O, (void *) $3 ); } |
742 |
- | SRCPORT EQUAL_T error { $$=0; yyerror("number expected"); } |
|
743 |
- | SRCPORT error { $$=0; yyerror("equal operator expected"); } |
|
744 |
- | DSTPORT EQUAL_T NUMBER { $$=mk_elem( EQUAL_OP, NUMBER_ST, |
|
744 |
+ | SRCPORT intop error { $$=0; yyerror("number expected"); } |
|
745 |
+ | SRCPORT error { $$=0; yyerror("==, !=, <,>, >= or <= expected"); } |
|
746 |
+ | DSTPORT intop NUMBER { $$=mk_elem( $2, NUMBER_ST, |
|
745 | 747 |
DSTPORT_O, (void *) $3 ); } |
746 |
- | DSTPORT EQUAL_T error { $$=0; yyerror("number expected"); } |
|
747 |
- | DSTPORT error { $$=0; yyerror("equal operator expected"); } |
|
748 |
- | PROTO EQUAL_T NUMBER { $$=mk_elem( EQUAL_OP, NUMBER_ST, |
|
748 |
+ | DSTPORT intop error { $$=0; yyerror("number expected"); } |
|
749 |
+ | DSTPORT error { $$=0; yyerror("==, !=, <,>, >= or <= expected"); } |
|
750 |
+ | PROTO intop NUMBER { $$=mk_elem( $2, NUMBER_ST, |
|
749 | 751 |
PROTO_O, (void *) $3 ); } |
750 |
- | PROTO EQUAL_T error { $$=0; yyerror("number expected"); } |
|
751 |
- | PROTO error { $$=0; yyerror("equal operator expected"); } |
|
752 |
- | AF EQUAL_T NUMBER { $$=mk_elem( EQUAL_OP, NUMBER_ST, |
|
752 |
+ | PROTO intop error { $$=0; yyerror("number expected"); } |
|
753 |
+ | PROTO error { $$=0; yyerror("equal/!= operator expected"); } |
|
754 |
+ | AF intop NUMBER { $$=mk_elem( $2, NUMBER_ST, |
|
753 | 755 |
AF_O, (void *) $3 ); } |
754 |
- | AF EQUAL_T error { $$=0; yyerror("number expected"); } |
|
755 |
- | AF error { $$=0; yyerror("equal operator expected"); } |
|
756 |
- | SRCIP EQUAL_T ipnet { $$=mk_elem( EQUAL_OP, NET_ST, |
|
756 |
+ | AF intop error { $$=0; yyerror("number expected"); } |
|
757 |
+ | AF error { $$=0; yyerror("equal/!= operator expected"); } |
|
758 |
+ | MSGLEN intop NUMBER { $$=mk_elem( $2, NUMBER_ST, |
|
759 |
+ MSGLEN_O, (void *) $3 ); } |
|
760 |
+ | MSGLEN intop MAX_LEN { $$=mk_elem( $2, NUMBER_ST, |
|
761 |
+ MSGLEN_O, (void *) BUF_SIZE); } |
|
762 |
+ | MSGLEN intop error { $$=0; yyerror("number expected"); } |
|
763 |
+ | MSGLEN error { $$=0; yyerror("equal/!= operator expected"); } |
|
764 |
+ | SRCIP equalop ipnet { $$=mk_elem( $2, NET_ST, |
|
757 | 765 |
SRCIP_O, $3); |
758 | 766 |
} |
759 |
- | SRCIP EQUAL_T STRING { $$=mk_elem( EQUAL_OP, STRING_ST, |
|
767 |
+ | SRCIP strop STRING { $$=mk_elem( $2, STRING_ST, |
|
760 | 768 |
SRCIP_O, $3); |
761 | 769 |
} |
762 |
- | SRCIP EQUAL_T host { $$=mk_elem( EQUAL_OP, STRING_ST, |
|
770 |
+ | SRCIP strop host { $$=mk_elem( $2, STRING_ST, |
|
763 | 771 |
SRCIP_O, $3); |
764 | 772 |
} |
765 |
- | SRCIP EQUAL_T MYSELF { $$=mk_elem( EQUAL_OP, MYSELF_ST, |
|
773 |
+ | SRCIP equalop MYSELF { $$=mk_elem( $2, MYSELF_ST, |
|
766 | 774 |
SRCIP_O, 0); |
767 | 775 |
} |
768 |
- | SRCIP EQUAL_T error { $$=0; yyerror( "ip address or hostname" |
|
776 |
+ | SRCIP strop error { $$=0; yyerror( "ip address or hostname" |
|
769 | 777 |
"expected" ); } |
770 |
- | SRCIP MATCH STRING { $$=mk_elem( MATCH_OP, STRING_ST, |
|
771 |
- SRCIP_O, $3); |
|
772 |
- } |
|
773 |
- | SRCIP MATCH ID { $$=mk_elem( MATCH_OP, STRING_ST, |
|
774 |
- SRCIP_O, $3); |
|
775 |
- } |
|
776 |
- | SRCIP MATCH error { $$=0; yyerror( "hostname expected"); } |
|
777 | 778 |
| SRCIP error { $$=0; |
778 |
- yyerror("invalid operator, == or =~ expected");} |
|
779 |
- | DSTIP EQUAL_T ipnet { $$=mk_elem( EQUAL_OP, NET_ST, |
|
779 |
+ yyerror("invalid operator, ==, != or =~ expected");} |
|
780 |
+ | DSTIP equalop ipnet { $$=mk_elem( $2, NET_ST, |
|
780 | 781 |
DSTIP_O, $3); |
781 | 782 |
} |
782 |
- | DSTIP EQUAL_T STRING { $$=mk_elem( EQUAL_OP, STRING_ST, |
|
783 |
+ | DSTIP strop STRING { $$=mk_elem( $2, STRING_ST, |
|
783 | 784 |
DSTIP_O, $3); |
784 | 785 |
} |
785 |
- | DSTIP EQUAL_T host { $$=mk_elem( EQUAL_OP, STRING_ST, |
|
786 |
+ | DSTIP strop host { $$=mk_elem( $2, STRING_ST, |
|
786 | 787 |
DSTIP_O, $3); |
787 | 788 |
} |
788 |
- | DSTIP EQUAL_T MYSELF { $$=mk_elem( EQUAL_OP, MYSELF_ST, |
|
789 |
+ | DSTIP equalop MYSELF { $$=mk_elem( $2, MYSELF_ST, |
|
789 | 790 |
DSTIP_O, 0); |
790 | 791 |
} |
791 |
- | DSTIP EQUAL_T error { $$=0; yyerror( "ip address or hostname" |
|
792 |
+ | DSTIP strop error { $$=0; yyerror( "ip address or hostname" |
|
792 | 793 |
"expected" ); } |
793 |
- | DSTIP MATCH STRING { $$=mk_elem( MATCH_OP, STRING_ST, |
|
794 |
- DSTIP_O, $3); |
|
795 |
- } |
|
796 |
- | DSTIP MATCH ID { $$=mk_elem( MATCH_OP, STRING_ST, |
|
797 |
- DSTIP_O, $3); |
|
798 |
- } |
|
799 |
- | DSTIP MATCH error { $$=0; yyerror ( "hostname expected" ); } |
|
800 | 794 |
| DSTIP error { $$=0; |
801 |
- yyerror("invalid operator, == or =~ expected");} |
|
802 |
- | MYSELF EQUAL_T URI { $$=mk_elem( EQUAL_OP, MYSELF_ST, |
|
795 |
+ yyerror("invalid operator, ==, != or =~ expected");} |
|
796 |
+ | MYSELF equalop URI { $$=mk_elem( $2, MYSELF_ST, |
|
803 | 797 |
URI_O, 0); |
804 | 798 |
} |
805 |
- | MYSELF EQUAL_T SRCIP { $$=mk_elem( EQUAL_OP, MYSELF_ST, |
|
799 |
+ | MYSELF equalop SRCIP { $$=mk_elem( $2, MYSELF_ST, |
|
806 | 800 |
SRCIP_O, 0); |
807 | 801 |
} |
808 |
- | MYSELF EQUAL_T DSTIP { $$=mk_elem( EQUAL_OP, MYSELF_ST, |
|
802 |
+ | MYSELF equalop DSTIP { $$=mk_elem( $2, MYSELF_ST, |
|
809 | 803 |
DSTIP_O, 0); |
810 | 804 |
} |
811 |
- | MYSELF EQUAL_T error { $$=0; |
|
805 |
+ | MYSELF equalop error { $$=0; |
|
812 | 806 |
yyerror(" URI, SRCIP or DSTIP expected"); } |
813 |
- | MYSELF error { $$=0; yyerror ("invalid operator, == expected"); } |
|
807 |
+ | MYSELF error { $$=0; |
|
808 |
+ yyerror ("invalid operator, == or != expected"); |
|
809 |
+ } |
|
814 | 810 |
| stm { $$=mk_elem( NO_OP, ACTIONS_ST, ACTION_O, $1 ); } |
815 | 811 |
| NUMBER {$$=mk_elem( NO_OP, NUMBER_ST, NUMBER_O, (void*)$1 ); } |
816 | 812 |
; |
... | ... |
@@ -851,6 +847,7 @@ host: ID { $$=$1; } |
851 | 847 |
|
852 | 848 |
|
853 | 849 |
stm: cmd { $$=$1; } |
850 |
+ | if_cmd { $$=$1; } |
|
854 | 851 |
| LBRACE actions RBRACE { $$=$2; } |
855 | 852 |
; |
856 | 853 |
|
... | ... |
@@ -860,6 +857,7 @@ actions: actions action {$$=append_action($1, $2); } |
860 | 857 |
; |
861 | 858 |
|
862 | 859 |
action: cmd SEMICOLON {$$=$1;} |
860 |
+ | if_cmd {$$=$1;} |
|
863 | 861 |
| SEMICOLON /* null action */ {$$=0;} |
864 | 862 |
| cmd error { $$=0; yyerror("bad command: missing ';'?"); } |
865 | 863 |
; |
... | ... |
@@ -1282,13 +1280,6 @@ cmd: FORWARD LPAREN host RPAREN { $$=mk_action( FORWARD_T, |
1282 | 1280 |
| SETFLAG LPAREN NUMBER RPAREN {$$=mk_action( SETFLAG_T, NUMBER_ST, 0, |
1283 | 1281 |
(void *)$3, 0 ); } |
1284 | 1282 |
| SETFLAG error { $$=0; yyerror("missing '(' or ')'?"); } |
1285 |
- |
|
1286 |
- | LEN_GT LPAREN NUMBER RPAREN {$$=mk_action( LEN_GT_T, NUMBER_ST, 0, |
|
1287 |
- (void *)$3, 0 ); } |
|
1288 |
- | LEN_GT LPAREN MAX_LEN RPAREN {$$=mk_action( LEN_GT_T, NUMBER_ST, 0, |
|
1289 |
- (void *) BUF_SIZE, 0 ); } |
|
1290 |
- | LEN_GT error { $$=0; yyerror("missing '(' or ')'?"); } |
|
1291 |
- |
|
1292 | 1283 |
| RESETFLAG LPAREN NUMBER RPAREN {$$=mk_action( RESETFLAG_T, NUMBER_ST, 0, |
1293 | 1284 |
(void *)$3, 0 ); } |
1294 | 1285 |
| RESETFLAG error { $$=0; yyerror("missing '(' or ')'?"); } |
... | ... |
@@ -1465,7 +1456,6 @@ cmd: FORWARD LPAREN host RPAREN { $$=mk_action( FORWARD_T, |
1465 | 1456 |
} |
1466 | 1457 |
} |
1467 | 1458 |
| ID LPAREN error RPAREN { $$=0; yyerror("bad arguments"); } |
1468 |
- | if_cmd { $$=$1; } |
|
1469 | 1459 |
; |
1470 | 1460 |
|
1471 | 1461 |
|
... | ... |
@@ -43,6 +43,7 @@ |
43 | 43 |
* 2003-06-28 kill_all_children is now used instead of kill(0, sig) |
44 | 44 |
* see comment above it for explanations. (andrei) |
45 | 45 |
* 2003-06-29 replaced port_no_str snprintf w/ int2str (andrei) |
46 |
+ * 2003-10-10 added switch for config check (-c) (andrei) |
|
46 | 47 |
* |
47 | 48 |
*/ |
48 | 49 |
|
... | ... |
@@ -196,6 +197,7 @@ static char help_msg[]= "\ |
196 | 197 |
Usage: " NAME " -l address [-p port] [-l address [-p port]...] [options]\n\ |
197 | 198 |
Options:\n\ |
198 | 199 |
-f file Configuration file (default " CFG_FILE ")\n\ |
200 |
+ -c Check configuration file for errors\n\ |
|
199 | 201 |
-p port Listen on the specified port (default: 5060)\n\ |
200 | 202 |
applies to the last address in -l and to all \n\ |
201 | 203 |
following that do not have a corespponding -p\n\ |
... | ... |
@@ -289,6 +291,7 @@ int sig_flag = 0; /* last signal received */ |
289 | 291 |
int debug = L_NOTICE; |
290 | 292 |
int dont_fork = 0; |
291 | 293 |
int log_stderr = 0; |
294 |
+int config_check = 0; |
|
292 | 295 |
/* check if reply first via host==us */ |
293 | 296 |
int check_via = 0; |
294 | 297 |
/* shall use stateful synonym branches? faster but not reboot-safe */ |
... | ... |
@@ -1262,13 +1265,17 @@ int main(int argc, char** argv) |
1262 | 1265 |
#ifdef STATS |
1263 | 1266 |
"s:" |
1264 | 1267 |
#endif |
1265 |
- "f:p:m:b:l:n:N:rRvdDETVhw:t:u:g:P:i:"; |
|
1268 |
+ "f:cp:m:b:l:n:N:rRvdDETVhw:t:u:g:P:i:"; |
|
1266 | 1269 |
|
1267 | 1270 |
while((c=getopt(argc,argv,options))!=-1){ |
1268 | 1271 |
switch(c){ |
1269 | 1272 |
case 'f': |
1270 | 1273 |
cfg_file=optarg; |
1271 | 1274 |
break; |
1275 |
+ case 'c': |
|
1276 |
+ config_check=1; |
|
1277 |
+ log_stderr=1; /* force stderr logging */ |
|
1278 |
+ break; |
|
1272 | 1279 |
case 's': |
1273 | 1280 |
#ifdef STATS |
1274 | 1281 |
stat_file=optarg; |
... | ... |
@@ -1710,6 +1717,10 @@ try_again: |
1710 | 1717 |
(sock_no>1)?" and more than one listen address found (will" |
1711 | 1718 |
" use only the the first one)":""); |
1712 | 1719 |
} |
1720 |
+ if (config_check){ |
|
1721 |
+ fprintf(stderr, "config file ok, exiting...\n"); |
|
1722 |
+ goto error; |
|
1723 |
+ } |
|
1713 | 1724 |
|
1714 | 1725 |
#ifdef USE_TCP |
1715 | 1726 |
if (!tcp_disable){ |
... | ... |
@@ -38,6 +38,7 @@ |
38 | 38 |
* 2003-04-05 s/reply_route/failure_route, onreply_route introduced (jiri) |
39 | 39 |
* 2003-05-23 comp_ip fixed, now it will resolve its operand and compare |
40 | 40 |
* the ip with all the addresses (andrei) |
41 |
+ * 2003-10-10 added more operators support to comp_* (<,>,<=,>=,!=) (andrei) |
|
41 | 42 |
*/ |
42 | 43 |
|
43 | 44 |
|
... | ... |
@@ -247,15 +248,28 @@ static int fix_actions(struct action* a) |
247 | 248 |
|
248 | 249 |
inline static int comp_no( int port, void *param, int op, int subtype ) |
249 | 250 |
{ |
250 |
- if (op!=EQUAL_OP) { |
|
251 |
- LOG(L_CRIT, "BUG: comp_no: '=' expected: %d\n", op ); |
|
252 |
- return E_BUG; |
|
253 |
- } |
|
251 |
+ |
|
254 | 252 |
if (subtype!=NUMBER_ST) { |
255 | 253 |
LOG(L_CRIT, "BUG: comp_no: number expected: %d\n", subtype ); |
256 | 254 |
return E_BUG; |
257 | 255 |
} |
258 |
- return port==(long)param; |
|
256 |
+ switch (op){ |
|
257 |
+ case EQUAL_OP: |
|
258 |
+ return port==(long)param; |
|
259 |
+ case DIFF_OP: |
|
260 |
+ return port!=(long)param; |
|
261 |
+ case GT_OP: |
|
262 |
+ return port>(long)param; |
|
263 |
+ case LT_OP: |
|
264 |
+ return port<(long)param; |
|
265 |
+ case GTE_OP: |
|
266 |
+ return port>=(long)param; |
|
267 |
+ case LTE_OP: |
|
268 |
+ return port<=(long)param; |
|
269 |
+ default: |
|
270 |
+ LOG(L_CRIT, "BUG: comp_no: unknown operator: %d\n", op ); |
|
271 |
+ return E_BUG; |
|
272 |
+ } |
|
259 | 273 |
} |
260 | 274 |
|
261 | 275 |
/* eval_elem helping function, returns str op param */ |
... | ... |
@@ -265,19 +279,29 @@ inline static int comp_strstr(str* str, void* param, int op, int subtype) |
265 | 279 |
char backup; |
266 | 280 |
|
267 | 281 |
ret=-1; |
268 |
- if (op==EQUAL_OP){ |
|
269 |
- if (subtype!=STRING_ST){ |
|
270 |
- LOG(L_CRIT, "BUG: comp_str: bad type %d, " |
|
271 |
- "string expected\n", subtype); |
|
272 |
- goto error; |
|
273 |
- } |
|
274 |
- ret=(strncasecmp(str->s, (char*)param, str->len)==0); |
|
275 |
- }else if (op==MATCH_OP){ |
|
276 |
- if (subtype!=RE_ST){ |
|
277 |
- LOG(L_CRIT, "BUG: comp_str: bad type %d, " |
|
278 |
- " RE expected\n", subtype); |
|
279 |
- goto error; |
|
280 |
- } |
|
282 |
+ switch(op){ |
|
283 |
+ case EQUAL_OP: |
|
284 |
+ if (subtype!=STRING_ST){ |
|
285 |
+ LOG(L_CRIT, "BUG: comp_str: bad type %d, " |
|
286 |
+ "string expected\n", subtype); |
|
287 |
+ goto error; |
|
288 |
+ } |
|
289 |
+ ret=(strncasecmp(str->s, (char*)param, str->len)==0); |
|
290 |
+ break; |
|
291 |
+ case DIFF_OP: |
|
292 |
+ if (subtype!=STRING_ST){ |
|
293 |
+ LOG(L_CRIT, "BUG: comp_str: bad type %d, " |
|
294 |
+ "string expected\n", subtype); |
|
295 |
+ goto error; |
|
296 |
+ } |
|
297 |
+ ret=(strncasecmp(str->s, (char*)param, str->len)!=0); |
|
298 |
+ break; |
|
299 |
+ case MATCH_OP: |
|
300 |
+ if (subtype!=RE_ST){ |
|
301 |
+ LOG(L_CRIT, "BUG: comp_str: bad type %d, " |
|
302 |
+ " RE expected\n", subtype); |
|
303 |
+ goto error; |
|
304 |
+ } |
|
281 | 305 |
/* this is really ugly -- we put a temporary zero-terminating |
282 | 306 |
* character in the original string; that's because regexps |
283 | 307 |
* take 0-terminated strings and our messages are not |
... | ... |
@@ -291,12 +315,13 @@ inline static int comp_strstr(str* str, void* param, int op, int subtype) |
291 | 315 |
* which might be too slow |
292 | 316 |
* -jiri |
293 | 317 |
*/ |
294 |
- backup=str->s[str->len];str->s[str->len]=0; |
|
295 |
- ret=(regexec((regex_t*)param, str->s, 0, 0, 0)==0); |
|
296 |
- str->s[str->len]=backup; |
|
297 |
- }else{ |
|
298 |
- LOG(L_CRIT, "BUG: comp_str: unknown op %d\n", op); |
|
299 |
- goto error; |
|
318 |
+ backup=str->s[str->len];str->s[str->len]=0; |
|
319 |
+ ret=(regexec((regex_t*)param, str->s, 0, 0, 0)==0); |
|
320 |
+ str->s[str->len]=backup; |
|
321 |
+ break; |
|
322 |
+ default: |
|
323 |
+ LOG(L_CRIT, "BUG: comp_str: unknown op %d\n", op); |
|
324 |
+ goto error; |
|
300 | 325 |
} |
301 | 326 |
return ret; |
302 | 327 |
|
... | ... |
@@ -310,23 +335,34 @@ inline static int comp_str(char* str, void* param, int op, int subtype) |
310 | 335 |
int ret; |
311 | 336 |
|
312 | 337 |
ret=-1; |
313 |
- if (op==EQUAL_OP){ |
|
314 |
- if (subtype!=STRING_ST){ |
|
315 |
- LOG(L_CRIT, "BUG: comp_str: bad type %d, " |
|
316 |
- "string expected\n", subtype); |
|
317 |
- goto error; |
|
318 |
- } |
|
319 |
- ret=(strcasecmp(str, (char*)param)==0); |
|
320 |
- }else if (op==MATCH_OP){ |
|
321 |
- if (subtype!=RE_ST){ |
|
322 |
- LOG(L_CRIT, "BUG: comp_str: bad type %d, " |
|
323 |
- " RE expected\n", subtype); |
|
338 |
+ switch(op){ |
|
339 |
+ case EQUAL_OP: |
|
340 |
+ if (subtype!=STRING_ST){ |
|
341 |
+ LOG(L_CRIT, "BUG: comp_str: bad type %d, " |
|
342 |
+ "string expected\n", subtype); |
|
343 |
+ goto error; |
|
344 |
+ } |
|
345 |
+ ret=(strcasecmp(str, (char*)param)==0); |
|
346 |
+ break; |
|
347 |
+ case DIFF_OP: |
|
348 |
+ if (subtype!=STRING_ST){ |
|
349 |
+ LOG(L_CRIT, "BUG: comp_str: bad type %d, " |
|
350 |
+ "string expected\n", subtype); |
|
351 |
+ goto error; |
|
352 |
+ } |
|
353 |
+ ret=(strcasecmp(str, (char*)param)!=0); |
|
354 |
+ break; |
|
355 |
+ case MATCH_OP: |
|
356 |
+ if (subtype!=RE_ST){ |
|
357 |
+ LOG(L_CRIT, "BUG: comp_str: bad type %d, " |
|
358 |
+ " RE expected\n", subtype); |
|
359 |
+ goto error; |
|
360 |
+ } |
|
361 |
+ ret=(regexec((regex_t*)param, str, 0, 0, 0)==0); |
|
362 |
+ break; |
|
363 |
+ default: |
|
364 |
+ LOG(L_CRIT, "BUG: comp_str: unknown op %d\n", op); |
|
324 | 365 |
goto error; |
325 |
- } |
|
326 |
- ret=(regexec((regex_t*)param, str, 0, 0, 0)==0); |
|
327 |
- }else{ |
|
328 |
- LOG(L_CRIT, "BUG: comp_str: unknown op %d\n", op); |
|
329 |
- goto error; |
|
330 | 366 |
} |
331 | 367 |
return ret; |
332 | 368 |
|
... | ... |
@@ -335,6 +371,25 @@ error: |
335 | 371 |
} |
336 | 372 |
|
337 | 373 |
|
374 |
+/* check_self wrapper -- it checks also for the op */ |
|
375 |
+inline static int check_self_op(int op, str* s, unsigned short p) |
|
376 |
+{ |
|
377 |
+ int ret; |
|
378 |
+ |
|
379 |
+ ret=check_self(s, p); |
|
380 |
+ switch(op){ |
|
381 |
+ case EQUAL_OP: |
|
382 |
+ break; |
|
383 |
+ case DIFF_OP: |
|
384 |
+ if (ret>=0) ret=!ret; |
|
385 |
+ break; |
|
386 |
+ default: |
|
387 |
+ LOG(L_CRIT, "BUG: check_self_op: invalid operator %d\n", op); |
|
388 |
+ ret=-1; |
|
389 |
+ } |
|
390 |
+ return ret; |
|
391 |
+} |
|
392 |
+ |
|
338 | 393 |
|
339 | 394 |
/* eval_elem helping function, returns an op param */ |
340 | 395 |
inline static int comp_ip(struct ip_addr* ip, void* param, int op, int subtype) |
... | ... |
@@ -347,45 +402,67 @@ inline static int comp_ip(struct ip_addr* ip, void* param, int op, int subtype) |
347 | 402 |
ret=-1; |
348 | 403 |
switch(subtype){ |
349 | 404 |
case NET_ST: |
350 |
- ret=matchnet(ip, (struct net*) param); |
|
351 |
- /*ret=(a&((struct net*)param)->mask)==((struct net*)param)->ip;*/ |
|
405 |
+ switch(op){ |
|
406 |
+ case EQUAL_OP: |
|
407 |
+ ret=(matchnet(ip, (struct net*) param)==1); |
|
408 |
+ break; |
|
409 |
+ case DIFF_OP: |
|
410 |
+ ret=(matchnet(ip, (struct net*) param)!=1); |
|
411 |
+ break; |
|
412 |
+ default: |
|
413 |
+ goto error_op; |
|
414 |
+ } |
|
352 | 415 |
break; |
353 | 416 |
case STRING_ST: |
354 | 417 |
case RE_ST: |
355 |
- /* 1: compare with ip2str*/ |
|
356 |
- ret=comp_str(ip_addr2a(ip), param, op, subtype); |
|
357 |
- if (ret==1) break; |
|
358 |
- /* 2: resolve (name) & compare w/ all the ips */ |
|
359 |
- he=resolvehost((char*)param); |
|
360 |
- if (he==0){ |
|
361 |
- DBG("comp_ip: could not resolve %s\n", (char*)param); |
|
362 |
- }else if (he->h_addrtype==ip->af){ |
|
363 |
- for(h=he->h_addr_list;(ret!=1)&& (*h); h++){ |
|
364 |
- ret=(memcmp(ip->u.addr, *h, ip->len)==0); |
|
365 |
- } |
|
366 |
- if (ret==1) break; |
|
367 |
- } |
|
368 |
- /* 3: (slow) rev dns the address |
|
369 |
- * and compare with all the aliases |
|
370 |
- * !!??!! review: remove this? */ |
|
371 |
- he=rev_resolvehost(ip); |
|
372 |
- if (he==0){ |
|
373 |
- print_ip( "comp_ip: could not rev_resolve ip address: ", |
|
374 |
- ip, "\n"); |
|
375 |
- ret=0; |
|
376 |
- }else{ |
|
377 |
- /* compare with primary host name */ |
|
378 |
- ret=comp_str(he->h_name, param, op, subtype); |
|
379 |
- /* compare with all the aliases */ |
|
380 |
- for(h=he->h_aliases; (ret!=1) && (*h); h++){ |
|
381 |
- ret=comp_str(*h, param, op, subtype); |
|
382 |
- } |
|
418 |
+ switch(op){ |
|
419 |
+ case EQUAL_OP: |
|
420 |
+ case MATCH_OP: |
|
421 |
+ /* 1: compare with ip2str*/ |
|
422 |
+ ret=comp_str(ip_addr2a(ip), param, op, subtype); |
|
423 |
+ if (ret==1) break; |
|
424 |
+ /* 2: resolve (name) & compare w/ all the ips */ |
|
425 |
+ if (subtype==STRING_ST){ |
|
426 |
+ he=resolvehost((char*)param); |
|
427 |
+ if (he==0){ |
|
428 |
+ DBG("comp_ip: could not resolve %s\n", |
|
429 |
+ (char*)param); |
|
430 |
+ }else if (he->h_addrtype==ip->af){ |
|
431 |
+ for(h=he->h_addr_list;(ret!=1)&& (*h); h++){ |
|
432 |
+ ret=(memcmp(ip->u.addr, *h, ip->len)==0); |
|
433 |
+ } |
|
434 |
+ if (ret==1) break; |
|
435 |
+ } |
|
436 |
+ } |
|
437 |
+ /* 3: (slow) rev dns the address |
|
438 |
+ * and compare with all the aliases |
|
439 |
+ * !!??!! review: remove this? */ |
|
440 |
+ he=rev_resolvehost(ip); |
|
441 |
+ if (he==0){ |
|
442 |
+ print_ip( "comp_ip: could not rev_resolve ip address:" |
|
443 |
+ " ", ip, "\n"); |
|
444 |
+ ret=0; |
|
445 |
+ }else{ |
|
446 |
+ /* compare with primary host name */ |
|
447 |
+ ret=comp_str(he->h_name, param, op, subtype); |
|
448 |
+ /* compare with all the aliases */ |
|
449 |
+ for(h=he->h_aliases; (ret!=1) && (*h); h++){ |
|
450 |
+ ret=comp_str(*h, param, op, subtype); |
|
451 |
+ } |
|
452 |
+ } |
|
453 |
+ break; |
|
454 |
+ case DIFF_OP: |
|
455 |
+ ret=comp_ip(ip, param, EQUAL_OP, subtype); |
|
456 |
+ if (ret>=0) ret=!ret; |
|
457 |
+ break; |
|
458 |
+ default: |
|
459 |
+ goto error_op; |
|
383 | 460 |
} |
384 | 461 |
break; |
385 | 462 |
case MYSELF_ST: /* check if it's one of our addresses*/ |
386 | 463 |
tmp.s=ip_addr2a(ip); |
387 | 464 |
tmp.len=strlen(tmp.s); |
388 |
- ret=check_self(&tmp, 0); |
|
465 |
+ ret=check_self_op(op, &tmp, 0); |
|
389 | 466 |
break; |
390 | 467 |
default: |
391 | 468 |
LOG(L_CRIT, "BUG: comp_ip: invalid type for " |
... | ... |
@@ -393,6 +470,9 @@ inline static int comp_ip(struct ip_addr* ip, void* param, int op, int subtype) |
393 | 470 |
ret=-1; |
394 | 471 |
} |
395 | 472 |
return ret; |
473 |
+error_op: |
|
474 |
+ LOG(L_CRIT, "BUG: comp_ip: invalid operator %d\n", op); |
|
475 |
+ return -1; |
|
396 | 476 |
|
397 | 477 |
} |
398 | 478 |
|
... | ... |
@@ -418,7 +498,7 @@ static int eval_elem(struct expr* e, struct sip_msg* msg) |
418 | 498 |
if(msg->new_uri.s){ |
419 | 499 |
if (e->subtype==MYSELF_ST){ |
420 | 500 |
if (parse_sip_msg_uri(msg)<0) ret=-1; |
421 |
- else ret=check_self(&msg->parsed_uri.host, |
|
501 |
+ else ret=check_self_op(e->op, &msg->parsed_uri.host, |
|
422 | 502 |
msg->parsed_uri.port_no? |
423 | 503 |
msg->parsed_uri.port_no:SIP_PORT); |
424 | 504 |
}else{ |
... | ... |
@@ -428,7 +508,7 @@ static int eval_elem(struct expr* e, struct sip_msg* msg) |
428 | 508 |
}else{ |
429 | 509 |
if (e->subtype==MYSELF_ST){ |
430 | 510 |
if (parse_sip_msg_uri(msg)<0) ret=-1; |
431 |
- else ret=check_self(&msg->parsed_uri.host, |
|
511 |
+ else ret=check_self_op(e->op, &msg->parsed_uri.host, |
|
432 | 512 |
msg->parsed_uri.port_no? |
433 | 513 |
msg->parsed_uri.port_no:SIP_PORT); |
434 | 514 |
}else{ |
... | ... |
@@ -467,6 +547,9 @@ static int eval_elem(struct expr* e, struct sip_msg* msg) |
467 | 547 |
case AF_O: |
468 | 548 |
ret=comp_no(msg->rcv.src_ip.af, e->r.param, e->op, e->subtype); |
469 | 549 |
break; |
550 |
+ case MSGLEN_O: |
|
551 |
+ ret=comp_no(msg->len, e->r.param, e->op, e->subtype); |
|
552 |
+ break; |
|
470 | 553 |
default: |
471 | 554 |
LOG(L_CRIT, "BUG: eval_elem: invalid operand %d\n", |
472 | 555 |
e->l.operand); |
... | ... |
@@ -30,6 +30,7 @@ |
30 | 30 |
* |
31 | 31 |
* 2003-04-12 FORCE_RPORT_T added (andrei) |
32 | 32 |
* 2003-04-22 strip_tail added (jiri) |
33 |
+ * 2003-10-10 >,<,>=,<=, != and MSGLEN_O added (andrei) |
|
33 | 34 |
*/ |
34 | 35 |
|
35 | 36 |
|
... | ... |
@@ -51,9 +52,10 @@ |
51 | 52 |
|
52 | 53 |
enum { EXP_T=1, ELEM_T }; |
53 | 54 |
enum { AND_OP=1, OR_OP, NOT_OP }; |
54 |
-enum { EQUAL_OP=10, MATCH_OP, NO_OP }; |
|
55 |
+enum { EQUAL_OP=10, MATCH_OP, GT_OP, LT_OP, GTE_OP, LTE_OP, DIFF_OP, NO_OP }; |
|
55 | 56 |
enum { METHOD_O=1, URI_O, SRCIP_O, SRCPORT_O, |
56 |
- DSTIP_O, DSTPORT_O, PROTO_O, AF_O, DEFAULT_O, ACTION_O, NUMBER_O}; |
|
57 |
+ DSTIP_O, DSTPORT_O, PROTO_O, AF_O, MSGLEN_O, DEFAULT_O, ACTION_O, |
|
58 |
+ NUMBER_O}; |
|
57 | 59 |
|
58 | 60 |
enum { FORWARD_T=1, SEND_T, DROP_T, LOG_T, ERROR_T, ROUTE_T, EXEC_T, |
59 | 61 |
SET_HOST_T, SET_HOSTPORT_T, SET_USER_T, SET_USERPASS_T, |
... | ... |
@@ -52,7 +52,7 @@ is a very fast and configurable SIP proxy. |
52 | 52 |
Displays a short usage description, including all available options. |
53 | 53 |
.TP |
54 | 54 |
.BI \-c |
55 |
-Performs loop checks and computes branches. |
|
55 |
+Checks the config file and displays the aliases and listen interface list. |
|
56 | 56 |
.TP |
57 | 57 |
.BI \-r |
58 | 58 |
Uses dns to check if it is necessary to add a "received=" field to a via. |