提交 c0ebbdd6 编写于 作者: O Oliver Hartkopp 提交者: Marc Kleine-Budde

can: gw: remove obsolete checks

In commit be286baf ("can: gw: add a variable
limit for CAN frame routings") the detection of the frame routing has been
changed. The former solution required dev->header_ops to be unused (== NULL).

I missed to remove the obsolete checks in the original commit - so here it is.
Signed-off-by: NOliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
上级 ac7686b9
...@@ -844,8 +844,7 @@ static int cgw_create_job(struct sk_buff *skb, struct nlmsghdr *nlh) ...@@ -844,8 +844,7 @@ static int cgw_create_job(struct sk_buff *skb, struct nlmsghdr *nlh)
if (!gwj->src.dev) if (!gwj->src.dev)
goto out; goto out;
/* check for CAN netdev not using header_ops - see gw_rcv() */ if (gwj->src.dev->type != ARPHRD_CAN)
if (gwj->src.dev->type != ARPHRD_CAN || gwj->src.dev->header_ops)
goto put_src_out; goto put_src_out;
gwj->dst.dev = dev_get_by_index(&init_net, gwj->ccgw.dst_idx); gwj->dst.dev = dev_get_by_index(&init_net, gwj->ccgw.dst_idx);
...@@ -853,8 +852,7 @@ static int cgw_create_job(struct sk_buff *skb, struct nlmsghdr *nlh) ...@@ -853,8 +852,7 @@ static int cgw_create_job(struct sk_buff *skb, struct nlmsghdr *nlh)
if (!gwj->dst.dev) if (!gwj->dst.dev)
goto put_src_out; goto put_src_out;
/* check for CAN netdev not using header_ops - see gw_rcv() */ if (gwj->dst.dev->type != ARPHRD_CAN)
if (gwj->dst.dev->type != ARPHRD_CAN || gwj->dst.dev->header_ops)
goto put_src_dst_out; goto put_src_dst_out;
gwj->limit_hops = limhops; gwj->limit_hops = limhops;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册