Changeset 4642

Show
Ignore:
Timestamp:
11/12/08 17:47:19 (2 months ago)
Author:
martin
Message:

BEET mode might want forwarding policies

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/charon/sa/child_sa.c

    r4639 r4642  
    336336                last_use = max(last_use, in); 
    337337            } 
    338             if (this->mode == MODE_TUNNEL
     338            if (this->mode != MODE_TRANSPORT
    339339            { 
    340340                if (charon->kernel_interface->query_policy(charon->kernel_interface, 
     
    619619                    this->my_spi, this->protocol, this->reqid, mode, this->ipcomp, 
    620620                    this->my_cpi, routed); 
    621             if (mode == MODE_TUNNEL
     621            if (mode != MODE_TRANSPORT
    622622            { 
    623623                status |= charon->kernel_interface->add_policy(charon->kernel_interface, 
     
    706706                /* remove old policies first */ 
    707707                charon->kernel_interface->del_policy(charon->kernel_interface, 
    708                                                 my_ts, other_ts, POLICY_OUT, FALSE); 
     708                                            my_ts, other_ts, POLICY_OUT, FALSE); 
    709709                charon->kernel_interface->del_policy(charon->kernel_interface, 
    710                                                 other_ts, my_ts,  POLICY_IN, FALSE); 
    711                 if (this->mode == MODE_TUNNEL
     710                                            other_ts, my_ts,  POLICY_IN, FALSE); 
     711                if (this->mode != MODE_TRANSPORT
    712712                { 
    713713                    charon->kernel_interface->del_policy(charon->kernel_interface, 
    714                                                 other_ts, my_ts, POLICY_FWD, FALSE); 
     714                                            other_ts, my_ts, POLICY_FWD, FALSE); 
    715715                } 
    716716                 
     
    744744                        this->protocol, this->reqid, this->mode, this->ipcomp, 
    745745                        this->my_cpi, FALSE); 
    746                 if (this->mode == MODE_TUNNEL
     746                if (this->mode != MODE_TRANSPORT
    747747                { 
    748748                    charon->kernel_interface->add_policy(charon->kernel_interface, 
     
    843843        { 
    844844            charon->kernel_interface->del_policy(charon->kernel_interface, 
    845                                                 my_ts, other_ts, POLICY_OUT, unrouted); 
     845                                        my_ts, other_ts, POLICY_OUT, unrouted); 
    846846            charon->kernel_interface->del_policy(charon->kernel_interface, 
    847                                                 other_ts, my_ts, POLICY_IN, unrouted); 
    848             if (this->mode == MODE_TUNNEL
     847                                        other_ts, my_ts, POLICY_IN, unrouted); 
     848            if (this->mode != MODE_TRANSPORT
    849849            { 
    850850                charon->kernel_interface->del_policy(charon->kernel_interface, 
    851                                                 other_ts, my_ts, POLICY_FWD, unrouted); 
     851                                        other_ts, my_ts, POLICY_FWD, unrouted); 
    852852            } 
    853853        }