Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188146
b: refs/heads/master
c: 7f7708f
h: refs/heads/master
v: v3
  • Loading branch information
Michael Braun authored and David S. Miller committed Mar 16, 2010
1 parent 5e85758 commit 88ecaa3
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0821ec55bb1382dd3b9476dc15d5dbbb19f0c3fd
refs/heads/master: 7f7708f0055e49e331f267700aa8b2ee879f004c
14 changes: 11 additions & 3 deletions trunk/net/bridge/br_forward.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
#include <linux/netfilter_bridge.h>
#include "br_private.h"

static int deliver_clone(struct net_bridge_port *prev, struct sk_buff *skb,
void (*__packet_hook)(const struct net_bridge_port *p,
struct sk_buff *skb));

/* Don't forward packets to originating port or forwarding diasabled */
static inline int should_deliver(const struct net_bridge_port *p,
const struct sk_buff *skb)
Expand Down Expand Up @@ -94,14 +98,18 @@ void br_deliver(const struct net_bridge_port *to, struct sk_buff *skb)
}

/* called with rcu_read_lock */
void br_forward(const struct net_bridge_port *to, struct sk_buff *skb)
void br_forward(const struct net_bridge_port *to, struct sk_buff *skb, struct sk_buff *skb0)
{
if (should_deliver(to, skb)) {
__br_forward(to, skb);
if (skb0)
deliver_clone(to, skb, __br_forward);
else
__br_forward(to, skb);
return;
}

kfree_skb(skb);
if (!skb0)
kfree_skb(skb);
}

static int deliver_clone(struct net_bridge_port *prev, struct sk_buff *skb,
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/bridge/br_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ int br_handle_frame_finish(struct sk_buff *skb)

if (skb) {
if (dst)
br_forward(dst->dst, skb);
br_forward(dst->dst, skb, skb2);
else
br_flood_forward(br, skb, skb2);
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/bridge/br_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ extern void br_deliver(const struct net_bridge_port *to,
struct sk_buff *skb);
extern int br_dev_queue_push_xmit(struct sk_buff *skb);
extern void br_forward(const struct net_bridge_port *to,
struct sk_buff *skb);
struct sk_buff *skb, struct sk_buff *skb0);
extern int br_forward_finish(struct sk_buff *skb);
extern void br_flood_deliver(struct net_bridge *br, struct sk_buff *skb);
extern void br_flood_forward(struct net_bridge *br, struct sk_buff *skb,
Expand Down

0 comments on commit 88ecaa3

Please sign in to comment.