Browse code

core: added forward()

- aliased forward() to forward(uri:host, uri:port)
- k 1.5.x compatibility
(cherry picked from commit 50237e89964b4fc8a4c8775076c1b75a05ee5e73)

Daniel-Constantin Mierla authored on 09/02/2010 10:23:50
Showing 1 changed files
... ...
@@ -2725,7 +2725,8 @@ avpflag_oper:
2725 2725
 	| ISAVPFLAGSET { $$ = -1; }
2726 2726
 	;
2727 2727
 cmd:
2728
-	FORWARD LPAREN host RPAREN	{ $$=mk_action(	FORWARD_T, 2, STRING_ST, $3, NUMBER_ST, 0); set_cfg_pos($$); }
2728
+	| FORWARD LPAREN RPAREN { $$=mk_action(FORWARD_T, 2, URIHOST_ST, 0, URIPORT_ST, 0); set_cfg_pos($$); }
2729
+	| FORWARD LPAREN host RPAREN	{ $$=mk_action(	FORWARD_T, 2, STRING_ST, $3, NUMBER_ST, 0); set_cfg_pos($$); }
2729 2730
 	| FORWARD LPAREN STRING RPAREN	{ $$=mk_action(	FORWARD_T, 2, STRING_ST, $3, NUMBER_ST, 0); set_cfg_pos($$); }
2730 2731
 	| FORWARD LPAREN ip RPAREN	{ $$=mk_action(	FORWARD_T, 2, IP_ST, (void*)$3, NUMBER_ST, 0); set_cfg_pos($$); }
2731 2732
 	| FORWARD LPAREN host COMMA NUMBER RPAREN { $$=mk_action(FORWARD_T, 2, STRING_ST, $3, NUMBER_ST, (void*)$5); set_cfg_pos($$); }