Changeset 11424


Ignore:
Timestamp:
01/15/09 20:19:18 (4 years ago)
Author:
BrainSlayer
Message:

fixes ipt_ROUTE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/linux/pb42/linux-2.6.22/net/ipv4/netfilter/ipt_ROUTE.c

    r11410 r11424  
    406406        return res; 
    407407} 
    408  
    409  
    410 static bool ipt_route_checkentry(const char *tablename, 
    411                                 const void *e, 
    412                                 const struct xt_target *target, 
    413                                 void *targinfo, 
    414                                 unsigned int hook_mask) 
    415 { 
    416         if (strcmp(tablename, "mangle") != 0) { 
    417                 printk("ipt_ROUTE: bad table `%s', use the `mangle' table.\n", 
    418                        tablename); 
    419                 return 0; 
    420         } 
    421  
    422         if (hook_mask & ~(  (1 << NF_IP_PRE_ROUTING) 
    423                             | (1 << NF_IP_LOCAL_IN) 
    424                             | (1 << NF_IP_FORWARD) 
    425                             | (1 << NF_IP_LOCAL_OUT) 
    426                             | (1 << NF_IP_POST_ROUTING))) { 
    427                 printk("ipt_ROUTE: bad hook\n"); 
    428                 return 0; 
    429         } 
    430  
     408static int ipt_route_checkentry(const char *tablename, 
     409                 const void *e_void, 
     410                 const struct xt_target *target, 
     411                 void *targinfo, 
     412                 unsigned int hook_mask) 
     413{ 
    431414        return 1; 
    432415} 
     
    435418static struct ipt_target ipt_route_reg = {  
    436419        .name = "ROUTE", 
     420        .family = AF_INET, 
    437421        .target = ipt_route_target, 
    438422        .targetsize = sizeof(struct ipt_route_target_info), 
    439423        .checkentry = ipt_route_checkentry, 
     424        .table  = "mangle", 
     425        .hooks  = 1 << NF_IP_PRE_ROUTING | 1 << NF_IP_LOCAL_IN | 1 << NF_IP_FORWARD | 1 << NF_IP_LOCAL_OUT | 1 << NF_IP_POST_ROUTING,  
    440426        .me = THIS_MODULE, 
    441427}; 
Note: See TracChangeset for help on using the changeset viewer.