]> rtime.felk.cvut.cz Git - socketcan-devel.git/blobdiff - kernel/2.6/net/can/gw.c
As we're using skb_mac_header() functions which rely on the fact, that CAN
[socketcan-devel.git] / kernel / 2.6 / net / can / gw.c
index 714985b22e7204a9e19598c4c5b90f8e43c2b83c..f09c75a65efcaa408aa9b6b0ce7cca02406bee8b 100644 (file)
@@ -824,6 +824,9 @@ static int cgw_create_job(struct sk_buff *skb,  struct nlmsghdr *nlh,
        if (gwj->src.dev->type != ARPHRD_CAN)
                goto put_src_out;
 
+       if (gwj->src.dev->header_ops)
+               goto put_src_out;
+
        gwj->dst.dev = dev_get_by_index(&init_net, gwj->ccgw.dst_idx);
 
        if (!gwj->dst.dev)
@@ -832,6 +835,9 @@ static int cgw_create_job(struct sk_buff *skb,  struct nlmsghdr *nlh,
        if (gwj->dst.dev->type != ARPHRD_CAN)
                goto put_src_dst_out;
                
+       if (gwj->dst.dev->header_ops)
+               goto put_src_dst_out;
+               
        ASSERT_RTNL();
 
        err = cgw_register_filter(gwj);