]> rtime.felk.cvut.cz Git - socketcan-devel.git/commit
cangw: Do not use skb->sk to detect already routed CAN frames.
authorhartkopp <hartkopp@030b6a49-0b11-0410-94ab-b0dab22257f2>
Thu, 9 Dec 2010 18:58:59 +0000 (18:58 +0000)
committerhartkopp <hartkopp@030b6a49-0b11-0410-94ab-b0dab22257f2>
Thu, 9 Dec 2010 18:58:59 +0000 (18:58 +0000)
commit6b0eb86f52e5c924bfe414b4bf541f0ff15d77ee
tree2a5c649bec815f10fca7c46a4def11a080c00724
parent656396bf59fefed400762a1b3b942f2c627370c3
cangw: Do not use skb->sk to detect already routed CAN frames.

As the latest changes to the can-gw have shown, the use of skb->sk created
several problems and still looks like a bad hack.

While checking the struct skbuff for usable containers to detect routed CAN-
frames that do not interfere with other sophisticated network technique, the
pointers to the [transport|network|mac]_header looked interesting.

So we mark routed frames by setting some mac header length which is not
relevant for the CAN frames located in the skb->data section.

As dev->header_ops is not set in CAN netdevices no one is ever accessing the
various header offsets in the CAN skbuffs anyway. E.g. using the packet socket
to read CAN frames is still working after this change to gw.c .

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1225 030b6a49-0b11-0410-94ab-b0dab22257f2
kernel/2.6/net/can/gw.c