Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 66779
b: refs/heads/master
c: b421995
h: refs/heads/master
i:
  66777: 6fccda8
  66775: c40e7e0
v: v3
  • Loading branch information
Herbert Xu authored and David S. Miller committed Oct 10, 2007
1 parent 5c839ef commit 6b40757
Show file tree
Hide file tree
Showing 6 changed files with 385 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ce1234d299f3823ea07019c0f7b7b0bcb81ee7a0
refs/heads/master: b4219952356baa162368f2f5dab6421a5dbc5e15
29 changes: 29 additions & 0 deletions trunk/include/linux/tc_act/tc_nat.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#ifndef __LINUX_TC_NAT_H
#define __LINUX_TC_NAT_H

#include <linux/pkt_cls.h>
#include <linux/types.h>

#define TCA_ACT_NAT 9

enum
{
TCA_NAT_UNSPEC,
TCA_NAT_PARMS,
TCA_NAT_TM,
__TCA_NAT_MAX
};
#define TCA_NAT_MAX (__TCA_NAT_MAX - 1)

#define TCA_NAT_FLAG_EGRESS 1

struct tc_nat
{
tc_gen;
__be32 old_addr;
__be32 new_addr;
__be32 mask;
__u32 flags;
};

#endif
21 changes: 21 additions & 0 deletions trunk/include/net/tc_act/tc_nat.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#ifndef __NET_TC_NAT_H
#define __NET_TC_NAT_H

#include <linux/types.h>
#include <net/act_api.h>

struct tcf_nat {
struct tcf_common common;

__be32 old_addr;
__be32 new_addr;
__be32 mask;
u32 flags;
};

static inline struct tcf_nat *to_tcf_nat(struct tcf_common *pc)
{
return container_of(pc, struct tcf_nat, common);
}

#endif /* __NET_TC_NAT_H */
11 changes: 11 additions & 0 deletions trunk/net/sched/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,17 @@ config NET_ACT_IPT
To compile this code as a module, choose M here: the
module will be called ipt.

config NET_ACT_NAT
tristate "Stateless NAT"
depends on NET_CLS_ACT
select NETFILTER
---help---
Say Y here to do stateless NAT on IPv4 packets. You should use
netfilter for NAT unless you know what you are doing.

To compile this code as a module, choose M here: the
module will be called nat.

config NET_ACT_PEDIT
tristate "Packet Editing"
depends on NET_CLS_ACT
Expand Down
1 change: 1 addition & 0 deletions trunk/net/sched/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ obj-$(CONFIG_NET_ACT_POLICE) += act_police.o
obj-$(CONFIG_NET_ACT_GACT) += act_gact.o
obj-$(CONFIG_NET_ACT_MIRRED) += act_mirred.o
obj-$(CONFIG_NET_ACT_IPT) += act_ipt.o
obj-$(CONFIG_NET_ACT_NAT) += act_nat.o
obj-$(CONFIG_NET_ACT_PEDIT) += act_pedit.o
obj-$(CONFIG_NET_ACT_SIMP) += act_simple.o
obj-$(CONFIG_NET_SCH_FIFO) += sch_fifo.o
Expand Down
Loading

0 comments on commit 6b40757

Please sign in to comment.