diff --git a/[refs] b/[refs] index dd5b770c1255..c3084bd3bee6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 156c2bb9f88065c8da78814f98fde665a5cbb527 +refs/heads/master: d904d3edcbb26efc86ea3575bb4265559801a94b diff --git a/trunk/include/uapi/linux/can/gw.h b/trunk/include/uapi/linux/can/gw.h index 8e1db18c3cb6..0505c7f86213 100644 --- a/trunk/include/uapi/linux/can/gw.h +++ b/trunk/include/uapi/linux/can/gw.h @@ -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 */ diff --git a/trunk/net/can/gw.c b/trunk/net/can/gw.c index 574dda78eb0f..37a3efb7cc9d 100644 --- a/trunk/net/can/gw.c +++ b/trunk/net/can/gw.c @@ -52,6 +52,7 @@ #include #include #include +#include #include #include #include @@ -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() *