Skip to content

Commit

Permalink
net: sched: ematch: obtain net pointer from blocks
Browse files Browse the repository at this point in the history
Instead of using tp->q, use block to get the net pointer.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Oct 16, 2017
1 parent 34e3759 commit c195456
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/sched/ematch.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ static int tcf_em_validate(struct tcf_proto *tp,
struct tcf_ematch_hdr *em_hdr = nla_data(nla);
int data_len = nla_len(nla) - 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))
goto errout;
Expand Down

0 comments on commit c195456

Please sign in to comment.