source: trunk/target/linux/generic/patches-2.6.36/102-netfilter_layer7_match.patch @ 24728

Last change on this file since 24728 was 24728, checked in by jow, 5 years ago

[generic] fix layer7 patches for Kernels >= 2.6.35, thanks Daniel Gimpelevich

File size: 1.5 KB
  • net/netfilter/xt_layer7.c

    a b static int layer7_write_proc(struct file 
    415415} 
    416416 
    417417static bool 
    418 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 28) 
     418#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35) 
     419match(const struct sk_buff *skbin, struct xt_action_param *par) 
     420#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 28) 
    419421match(const struct sk_buff *skbin, const struct xt_match_param *par) 
    420422#else 
    421423match(const struct sk_buff *skbin, 
    match(const struct sk_buff *skbin, 
    597599} 
    598600 
    599601// load nf_conntrack_ipv4 
     602#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35) 
     603static int 
     604#else 
     605static bool 
     606#endif 
    600607#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 28) 
    601 static bool check(const struct xt_mtchk_param *par) 
     608check(const struct xt_mtchk_param *par) 
    602609{ 
    603610        if (nf_ct_l3proto_try_module_get(par->match->family) < 0) { 
    604611                printk(KERN_WARNING "can't load conntrack support for " 
    605612                                    "proto=%d\n", par->match->family); 
    606613#else 
    607 static bool check(const char *tablename, const void *inf, 
     614check(const char *tablename, const void *inf, 
    608615                 const struct xt_match *match, void *matchinfo, 
    609616                 unsigned int hook_mask) 
    610617{ 
    static bool check(const char *tablename, 
    612619                printk(KERN_WARNING "can't load conntrack support for " 
    613620                                    "proto=%d\n", match->family); 
    614621#endif 
     622#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35) 
     623                return -EINVAL; 
     624        } 
     625        return 0; 
     626#else 
    615627                return 0; 
    616628        } 
    617629        return 1; 
     630#endif 
    618631} 
    619632 
    620633 
Note: See TracBrowser for help on using the repository browser.