Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 369906
b: refs/heads/master
c: 0dcffd0
h: refs/heads/master
v: v3
  • Loading branch information
Jamal Hadi Salim authored and David S. Miller committed May 1, 2013
1 parent 454f9bb commit 8c89de0
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fe86d714168f1567989c309f73a3550022686301
refs/heads/master: 0dcffd09641f3abb21ac5cabc61542ab289d1a3c
33 changes: 30 additions & 3 deletions trunk/net/sched/act_ipt.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
* Copyright: Jamal Hadi Salim (2002-4)
* Copyright: Jamal Hadi Salim (2002-13)
*/

#include <linux/types.h>
Expand Down Expand Up @@ -303,17 +303,44 @@ static struct tc_action_ops act_ipt_ops = {
.walk = tcf_generic_walker
};

MODULE_AUTHOR("Jamal Hadi Salim(2002-4)");
static struct tc_action_ops act_xt_ops = {
.kind = "xt",
.hinfo = &ipt_hash_info,
.type = TCA_ACT_IPT,
.capab = TCA_CAP_NONE,
.owner = THIS_MODULE,
.act = tcf_ipt,
.dump = tcf_ipt_dump,
.cleanup = tcf_ipt_cleanup,
.lookup = tcf_hash_search,
.init = tcf_ipt_init,
.walk = tcf_generic_walker
};

MODULE_AUTHOR("Jamal Hadi Salim(2002-13)");
MODULE_DESCRIPTION("Iptables target actions");
MODULE_LICENSE("GPL");
MODULE_ALIAS("act_xt");

static int __init ipt_init_module(void)
{
return tcf_register_action(&act_ipt_ops);
int ret1, ret2;
ret1 = tcf_register_action(&act_xt_ops);
if (ret1 < 0)
printk("Failed to load xt action\n");
ret2 = tcf_register_action(&act_ipt_ops);
if (ret2 < 0)
printk("Failed to load ipt action\n");

if (ret1 < 0 && ret2 < 0)
return ret1;
else
return 0;
}

static void __exit ipt_cleanup_module(void)
{
tcf_unregister_action(&act_xt_ops);
tcf_unregister_action(&act_ipt_ops);
}

Expand Down

0 comments on commit 8c89de0

Please sign in to comment.