- changed sip_msg (new rcv member containing all the ips, ports, protocol)
[sip-router] / route.c
diff --git a/route.c b/route.c
index e8f3597..04235ae 100644 (file)
--- a/route.c
+++ b/route.c
@@ -145,7 +145,10 @@ static int fix_actions(struct action* a)
        for(t=a; t!=0; t=t->next){
                switch(t->type){
                        case FORWARD_T:
+                       case FORWARD_TCP_T:
+                       case FORWARD_UDP_T:
                        case SEND_T:
+                       case SEND_TCP_T:
                                        switch(t->p1_type){
                                                case IP_ST: 
                                                        tmp=strdup(ip_addr2a(
@@ -358,10 +361,10 @@ static int eval_elem(struct expr* e, struct sip_msg* msg)
                                }
                                break;
                case SRCIP_O:
-                               ret=comp_ip(&msg->src_ip, e->r.param, e->op, e->subtype);
+                               ret=comp_ip(&msg->rcv.src_ip, e->r.param, e->op, e->subtype);
                                break;
                case DSTIP_O:
-                               ret=comp_ip(&msg->dst_ip, e->r.param, e->op, e->subtype);
+                               ret=comp_ip(&msg->rcv.dst_ip, e->r.param, e->op, e->subtype);
                                break;
                case NUMBER_O:
                                ret=!(!e->r.intval); /* !! to transform it in {0,1} */