|
@@ -288,8 +288,7 @@ struct ipt_entry *ipt_next_entry(const struct ipt_entry *entry)
|
|
unsigned int
|
|
unsigned int
|
|
ipt_do_table(struct sk_buff *skb,
|
|
ipt_do_table(struct sk_buff *skb,
|
|
unsigned int hook,
|
|
unsigned int hook,
|
|
- const struct net_device *in,
|
|
|
|
- const struct net_device *out,
|
|
|
|
|
|
+ const struct nf_hook_state *state,
|
|
struct xt_table *table)
|
|
struct xt_table *table)
|
|
{
|
|
{
|
|
static const char nulldevname[IFNAMSIZ] __attribute__((aligned(sizeof(long))));
|
|
static const char nulldevname[IFNAMSIZ] __attribute__((aligned(sizeof(long))));
|
|
@@ -306,8 +305,8 @@ ipt_do_table(struct sk_buff *skb,
|
|
|
|
|
|
/* Initialization */
|
|
/* Initialization */
|
|
ip = ip_hdr(skb);
|
|
ip = ip_hdr(skb);
|
|
- indev = in ? in->name : nulldevname;
|
|
|
|
- outdev = out ? out->name : nulldevname;
|
|
|
|
|
|
+ indev = state->in ? state->in->name : nulldevname;
|
|
|
|
+ outdev = state->out ? state->out->name : nulldevname;
|
|
/* We handle fragments by dealing with the first fragment as
|
|
/* We handle fragments by dealing with the first fragment as
|
|
* if it was a normal packet. All other fragments are treated
|
|
* if it was a normal packet. All other fragments are treated
|
|
* normally, except that they will NEVER match rules that ask
|
|
* normally, except that they will NEVER match rules that ask
|
|
@@ -317,8 +316,8 @@ ipt_do_table(struct sk_buff *skb,
|
|
acpar.fragoff = ntohs(ip->frag_off) & IP_OFFSET;
|
|
acpar.fragoff = ntohs(ip->frag_off) & IP_OFFSET;
|
|
acpar.thoff = ip_hdrlen(skb);
|
|
acpar.thoff = ip_hdrlen(skb);
|
|
acpar.hotdrop = false;
|
|
acpar.hotdrop = false;
|
|
- acpar.in = in;
|
|
|
|
- acpar.out = out;
|
|
|
|
|
|
+ acpar.in = state->in;
|
|
|
|
+ acpar.out = state->out;
|
|
acpar.family = NFPROTO_IPV4;
|
|
acpar.family = NFPROTO_IPV4;
|
|
acpar.hooknum = hook;
|
|
acpar.hooknum = hook;
|
|
|
|
|
|
@@ -370,7 +369,7 @@ ipt_do_table(struct sk_buff *skb,
|
|
#if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE)
|
|
#if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE)
|
|
/* The packet is traced: log it */
|
|
/* The packet is traced: log it */
|
|
if (unlikely(skb->nf_trace))
|
|
if (unlikely(skb->nf_trace))
|
|
- trace_packet(skb, hook, in, out,
|
|
|
|
|
|
+ trace_packet(skb, hook, state->in, state->out,
|
|
table->name, private, e);
|
|
table->name, private, e);
|
|
#endif
|
|
#endif
|
|
/* Standard target? */
|
|
/* Standard target? */
|