View | Details | Raw Unified | Return to bug 22065 | Differences between
and this patch

Collapse All | Expand All

(-)sys/netinet/ip_fw.c Tue Oct 17 16:08:36 2000 (-3 / +9 lines)
Lines 722-728 Link Here
722
           break ;
722
           break ;
723
       case TH_SYN | (TH_SYN << 8) :
723
       case TH_SYN | (TH_SYN << 8) :
724
           /* move to established */
724
           /* move to established */
725
           q->expire = time_second + dyn_ack_lifetime ;
725
           q->expire = time_second + (q->lifetime ? q->lifetime : dyn_ack_lifetime) ;
726
           break ;
726
           break ;
727
       case TH_SYN | (TH_SYN << 8) | TH_FIN :
727
       case TH_SYN | (TH_SYN << 8) | TH_FIN :
728
       case TH_SYN | (TH_SYN << 8) | (TH_FIN << 8) :
728
       case TH_SYN | (TH_SYN << 8) | (TH_FIN << 8) :
Lines 747-753 Link Here
747
       }
747
       }
748
    } else {
748
    } else {
749
       /* should do something for UDP and others... */
749
       /* should do something for UDP and others... */
750
       q->expire = time_second + dyn_short_lifetime ;
750
       q->expire = time_second + (q->lifetime ? q->lifetime : dyn_short_lifetime) ;
751
    }
751
    }
752
    if (match_direction)
752
    if (match_direction)
753
       *match_direction = dir ;
753
       *match_direction = dir ;
Lines 795-801 Link Here
795
    if (mask)
795
    if (mask)
796
       r->mask = *mask ;
796
       r->mask = *mask ;
797
    r->id = *id ;
797
    r->id = *id ;
798
    r->expire = time_second + dyn_syn_lifetime ;
798
    r->lifetime = chain->rule->fw_dyn_lifetime ;
799
    if (r->lifetime)
800
       r->expire = time_second + r->lifetime ;
801
    else if (r->id.proto == IPPROTO_TCP)
802
       r->expire = time_second + dyn_syn_lifetime ;
803
    else
804
        r->expire = time_second + dyn_short_lifetime ;
799
    r->chain = chain ;
805
    r->chain = chain ;
800
    r->type = ((struct ip_fw_ext *)chain->rule)->dyn_type ;
806
    r->type = ((struct ip_fw_ext *)chain->rule)->dyn_type ;

Return to bug 22065