Commit c1954561 authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller

net: sched: ematch: obtain net pointer from blocks

Instead of using tp->q, use block to get the net pointer.
Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 34e3759c
...@@ -178,7 +178,7 @@ static int tcf_em_validate(struct tcf_proto *tp, ...@@ -178,7 +178,7 @@ static int tcf_em_validate(struct tcf_proto *tp,
struct tcf_ematch_hdr *em_hdr = nla_data(nla); struct tcf_ematch_hdr *em_hdr = nla_data(nla);
int data_len = nla_len(nla) - sizeof(*em_hdr); int data_len = nla_len(nla) - sizeof(*em_hdr);
void *data = (void *) em_hdr + sizeof(*em_hdr); void *data = (void *) em_hdr + sizeof(*em_hdr);
struct net *net = dev_net(qdisc_dev(tp->q)); struct net *net = tp->chain->block->net;
if (!TCF_EM_REL_VALID(em_hdr->flags)) if (!TCF_EM_REL_VALID(em_hdr->flags))
goto errout; goto errout;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment