Changeset 17086
- Timestamp:
- 05/17/11 19:08:39 (2 years ago)
- Location:
- src/linux/xscale/linux-2.6.34.6/net/bridge
- Files:
-
- 4 edited
-
br_forward.c (modified) (5 diffs)
-
br_input.c (modified) (1 diff)
-
br_private.h (modified) (1 diff)
-
br_sysfs_if.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/linux/xscale/linux-2.6.34.6/net/bridge/br_forward.c
r16036 r17086 125 125 void br_forward(const struct net_bridge_port *to, struct sk_buff *skb, struct sk_buff *skb0) 126 126 { 127 if (should_deliver(to, skb) ) {127 if (should_deliver(to, skb) && !(to->flags & BR_ISOLATE_MODE)) { 128 128 if (skb0) 129 129 deliver_clone(to, skb, __br_forward); … … 180 180 struct sk_buff *skb0, 181 181 void (*__packet_hook)(const struct net_bridge_port *p, 182 struct sk_buff *skb)) 182 struct sk_buff *skb), 183 bool forward) 183 184 { 184 185 struct net_bridge_port *p; … … 188 189 189 190 list_for_each_entry_rcu(p, &br->port_list, list) { 191 if (forward && (p->flags & BR_ISOLATE_MODE)) 192 continue; 193 190 194 prev = maybe_deliver(prev, p, skb, __packet_hook); 191 195 if (IS_ERR(prev)) … … 211 215 void br_flood_deliver(struct net_bridge *br, struct sk_buff *skb) 212 216 { 213 br_flood(br, skb, NULL, __br_deliver );217 br_flood(br, skb, NULL, __br_deliver, false); 214 218 } 215 219 … … 218 222 struct sk_buff *skb2) 219 223 { 220 br_flood(br, skb, skb2, __br_forward );224 br_flood(br, skb, skb2, __br_forward, true); 221 225 } 222 226 -
src/linux/xscale/linux-2.6.34.6/net/bridge/br_input.c
r16424 r17086 88 88 89 89 br->dev->stats.multicast++; 90 } else if ((dst = __br_fdb_get(br, dest)) && dst->is_local) { 90 } else if ((p->flags & BR_ISOLATE_MODE) || 91 ((dst = __br_fdb_get(br, dest)) && dst->is_local)) { 91 92 skb2 = skb; 92 93 /* Do not forward the packet since it's local. */ -
src/linux/xscale/linux-2.6.34.6/net/bridge/br_private.h
r16001 r17086 120 120 unsigned long flags; 121 121 #define BR_HAIRPIN_MODE 0x00000001 122 #define BR_ISOLATE_MODE 0x00000002 122 123 123 124 #ifdef CONFIG_BRIDGE_IGMP_SNOOPING -
src/linux/xscale/linux-2.6.34.6/net/bridge/br_sysfs_if.c
r16001 r17086 159 159 static BRPORT_ATTR(hairpin_mode, S_IRUGO | S_IWUSR, 160 160 show_hairpin_mode, store_hairpin_mode); 161 162 static ssize_t show_isolate_mode(struct net_bridge_port *p, char *buf) 163 { 164 int isolate_mode = (p->flags & BR_ISOLATE_MODE) ? 1 : 0; 165 return sprintf(buf, "%d\n", isolate_mode); 166 } 167 static ssize_t store_isolate_mode(struct net_bridge_port *p, unsigned long v) 168 { 169 if (v) 170 p->flags |= BR_ISOLATE_MODE; 171 else 172 p->flags &= ~BR_ISOLATE_MODE; 173 return 0; 174 } 175 static BRPORT_ATTR(isolate_mode, S_IRUGO | S_IWUSR, 176 show_isolate_mode, store_isolate_mode); 161 177 162 178 #ifdef CONFIG_BRIDGE_IGMP_SNOOPING … … 192 208 &brport_attr_flush, 193 209 &brport_attr_hairpin_mode, 210 &brport_attr_isolate_mode, 194 211 #ifdef CONFIG_BRIDGE_IGMP_SNOOPING 195 212 &brport_attr_multicast_router,
Note: See TracChangeset
for help on using the changeset viewer.
