if (!gwj->src.dev)
goto out;
if (!gwj->src.dev)
goto out;
- if (gwj->src.dev->type != ARPHRD_CAN)
- goto put_src_out;
-
- if (gwj->src.dev->header_ops)
+ /* check for CAN netdev not using header_ops - see gw_rcv() */
+ if (gwj->src.dev->type != ARPHRD_CAN || gwj->src.dev->header_ops)
goto put_src_out;
gwj->dst.dev = dev_get_by_index(&init_net, gwj->ccgw.dst_idx);
goto put_src_out;
gwj->dst.dev = dev_get_by_index(&init_net, gwj->ccgw.dst_idx);
if (!gwj->dst.dev)
goto put_src_out;
if (!gwj->dst.dev)
goto put_src_out;
- if (gwj->dst.dev->type != ARPHRD_CAN)
- goto put_src_dst_out;
-
- if (gwj->dst.dev->header_ops)
+ /* check for CAN netdev not using header_ops - see gw_rcv() */
+ if (gwj->dst.dev->type != ARPHRD_CAN || gwj->dst.dev->header_ops)
goto put_src_dst_out;
ASSERT_RTNL();
goto put_src_dst_out;
ASSERT_RTNL();