diff options
Diffstat (limited to 'net/bridge/br_forward.c')
-rw-r--r-- | net/bridge/br_forward.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/net/bridge/br_forward.c b/net/bridge/br_forward.c index ada7f495445c..bdd7c35c3c7b 100644 --- a/net/bridge/br_forward.c +++ b/net/bridge/br_forward.c | |||
@@ -100,24 +100,13 @@ void br_forward(const struct net_bridge_port *to, struct sk_buff *skb) | |||
100 | } | 100 | } |
101 | 101 | ||
102 | /* called under bridge lock */ | 102 | /* called under bridge lock */ |
103 | static void br_flood(struct net_bridge *br, struct sk_buff *skb, int clone, | 103 | static void br_flood(struct net_bridge *br, struct sk_buff *skb, |
104 | void (*__packet_hook)(const struct net_bridge_port *p, | 104 | void (*__packet_hook)(const struct net_bridge_port *p, |
105 | struct sk_buff *skb)) | 105 | struct sk_buff *skb)) |
106 | { | 106 | { |
107 | struct net_bridge_port *p; | 107 | struct net_bridge_port *p; |
108 | struct net_bridge_port *prev; | 108 | struct net_bridge_port *prev; |
109 | 109 | ||
110 | if (clone) { | ||
111 | struct sk_buff *skb2; | ||
112 | |||
113 | if ((skb2 = skb_clone(skb, GFP_ATOMIC)) == NULL) { | ||
114 | br->statistics.tx_dropped++; | ||
115 | return; | ||
116 | } | ||
117 | |||
118 | skb = skb2; | ||
119 | } | ||
120 | |||
121 | prev = NULL; | 110 | prev = NULL; |
122 | 111 | ||
123 | list_for_each_entry_rcu(p, &br->port_list, list) { | 112 | list_for_each_entry_rcu(p, &br->port_list, list) { |
@@ -148,13 +137,13 @@ static void br_flood(struct net_bridge *br, struct sk_buff *skb, int clone, | |||
148 | 137 | ||
149 | 138 | ||
150 | /* called with rcu_read_lock */ | 139 | /* called with rcu_read_lock */ |
151 | void br_flood_deliver(struct net_bridge *br, struct sk_buff *skb, int clone) | 140 | void br_flood_deliver(struct net_bridge *br, struct sk_buff *skb) |
152 | { | 141 | { |
153 | br_flood(br, skb, clone, __br_deliver); | 142 | br_flood(br, skb, __br_deliver); |
154 | } | 143 | } |
155 | 144 | ||
156 | /* called under bridge lock */ | 145 | /* called under bridge lock */ |
157 | void br_flood_forward(struct net_bridge *br, struct sk_buff *skb, int clone) | 146 | void br_flood_forward(struct net_bridge *br, struct sk_buff *skb) |
158 | { | 147 | { |
159 | br_flood(br, skb, clone, __br_forward); | 148 | br_flood(br, skb, __br_forward); |
160 | } | 149 | } |