Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 351694
b: refs/heads/master
c: d904d3e
h: refs/heads/master
v: v3
  • Loading branch information
Oliver Hartkopp authored and Marc Kleine-Budde committed Jan 26, 2013
1 parent 25f2580 commit 7047ddb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 156c2bb9f88065c8da78814f98fde665a5cbb527
refs/heads/master: d904d3edcbb26efc86ea3575bb4265559801a94b
1 change: 1 addition & 0 deletions trunk/include/uapi/linux/can/gw.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ enum {

#define CGW_FLAGS_CAN_ECHO 0x01
#define CGW_FLAGS_CAN_SRC_TSTAMP 0x02
#define CGW_FLAGS_CAN_IIF_TX_OK 0x04

#define CGW_MOD_FUNCS 4 /* AND OR XOR SET */

Expand Down
8 changes: 8 additions & 0 deletions trunk/net/can/gw.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
#include <linux/skbuff.h>
#include <linux/can.h>
#include <linux/can/core.h>
#include <linux/can/skb.h>
#include <linux/can/gw.h>
#include <net/rtnetlink.h>
#include <net/net_namespace.h>
Expand Down Expand Up @@ -347,6 +348,13 @@ static void can_can_gw_rcv(struct sk_buff *skb, void *data)
return;
}

/* is sending the skb back to the incoming interface not allowed? */
if (!(gwj->flags & CGW_FLAGS_CAN_IIF_TX_OK) &&
skb_headroom(skb) == sizeof(struct can_skb_priv) &&
(((struct can_skb_priv *)(skb->head))->ifindex ==
gwj->dst.dev->ifindex))
return;

/*
* clone the given skb, which has not been done in can_rcv()
*
Expand Down

0 comments on commit 7047ddb

Please sign in to comment.