/* * Copyright (c) 2011 Patrick McHardy <kaber@trash.net> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ #include <linux/module.h> #include <linux/skbuff.h> #include <linux/netdevice.h> #include <linux/netfilter/xt_devgroup.h> #include <linux/netfilter/x_tables.h> MODULE_AUTHOR("Patrick McHardy <kaber@trash.net>"); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("Xtables: Device group match"); MODULE_ALIAS("ipt_devgroup"); MODULE_ALIAS("ip6t_devgroup");
static bool devgroup_mt(const struct sk_buff *skb, struct xt_action_param *par) { const struct xt_devgroup_info *info = par->matchinfo; if (info->flags & XT_DEVGROUP_MATCH_SRC && (((info->src_group ^ xt_in(par)->group) & info->src_mask ? 1 : 0) ^ ((info->flags & XT_DEVGROUP_INVERT_SRC) ? 1 : 0))) return false; if (info->flags & XT_DEVGROUP_MATCH_DST && (((info->dst_group ^ xt_out(par)->group) & info->dst_mask ? 1 : 0) ^ ((info->flags & XT_DEVGROUP_INVERT_DST) ? 1 : 0))) return false; return true; }Contributors
Person | Tokens | Prop | Commits | CommitProp |
Patrick McHardy | 124 | 95.38% | 1 | 50.00% |
Pablo Neira Ayuso | 6 | 4.62% | 1 | 50.00% |
Total | 130 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Patrick McHardy | 120 | 100.00% | 1 | 100.00% |
Total | 120 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Patrick McHardy | 16 | 100.00% | 1 | 100.00% |
Total | 16 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Patrick McHardy | 15 | 100.00% | 1 | 100.00% |
Total | 15 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Patrick McHardy | 368 | 98.40% | 1 | 50.00% |
Pablo Neira Ayuso | 6 | 1.60% | 1 | 50.00% |
Total | 374 | 100.00% | 2 | 100.00% |