Lines Matching refs:skb
25 struct sk_buff *skb,
27 struct sk_buff *skb));
31 const struct sk_buff *skb) in should_deliver() argument
33 return ((p->flags & BR_HAIRPIN_MODE) || skb->dev != p->dev) && in should_deliver()
34 br_allowed_egress(p->br, nbp_get_vlan_info(p), skb) && in should_deliver()
38 int br_dev_queue_push_xmit(struct sock *sk, struct sk_buff *skb) in br_dev_queue_push_xmit() argument
40 if (!is_skb_forwardable(skb->dev, skb)) { in br_dev_queue_push_xmit()
41 kfree_skb(skb); in br_dev_queue_push_xmit()
43 skb_push(skb, ETH_HLEN); in br_dev_queue_push_xmit()
44 br_drop_fake_rtable(skb); in br_dev_queue_push_xmit()
45 skb_sender_cpu_clear(skb); in br_dev_queue_push_xmit()
46 dev_queue_xmit(skb); in br_dev_queue_push_xmit()
53 int br_forward_finish(struct sock *sk, struct sk_buff *skb) in br_forward_finish() argument
55 return NF_HOOK(NFPROTO_BRIDGE, NF_BR_POST_ROUTING, sk, skb, in br_forward_finish()
56 NULL, skb->dev, in br_forward_finish()
62 static void __br_deliver(const struct net_bridge_port *to, struct sk_buff *skb) in __br_deliver() argument
64 skb = br_handle_vlan(to->br, nbp_get_vlan_info(to), skb); in __br_deliver()
65 if (!skb) in __br_deliver()
68 skb->dev = to->dev; in __br_deliver()
71 if (!is_skb_forwardable(skb->dev, skb)) in __br_deliver()
72 kfree_skb(skb); in __br_deliver()
74 skb_push(skb, ETH_HLEN); in __br_deliver()
75 br_netpoll_send_skb(to, skb); in __br_deliver()
80 NF_HOOK(NFPROTO_BRIDGE, NF_BR_LOCAL_OUT, NULL, skb, in __br_deliver()
81 NULL, skb->dev, in __br_deliver()
85 static void __br_forward(const struct net_bridge_port *to, struct sk_buff *skb) in __br_forward() argument
89 if (skb_warn_if_lro(skb)) { in __br_forward()
90 kfree_skb(skb); in __br_forward()
94 skb = br_handle_vlan(to->br, nbp_get_vlan_info(to), skb); in __br_forward()
95 if (!skb) in __br_forward()
98 indev = skb->dev; in __br_forward()
99 skb->dev = to->dev; in __br_forward()
100 skb_forward_csum(skb); in __br_forward()
102 NF_HOOK(NFPROTO_BRIDGE, NF_BR_FORWARD, NULL, skb, in __br_forward()
103 indev, skb->dev, in __br_forward()
108 void br_deliver(const struct net_bridge_port *to, struct sk_buff *skb) in br_deliver() argument
110 if (to && should_deliver(to, skb)) { in br_deliver()
111 __br_deliver(to, skb); in br_deliver()
115 kfree_skb(skb); in br_deliver()
120 void br_forward(const struct net_bridge_port *to, struct sk_buff *skb, struct sk_buff *skb0) in br_forward() argument
122 if (should_deliver(to, skb)) { in br_forward()
124 deliver_clone(to, skb, __br_forward); in br_forward()
126 __br_forward(to, skb); in br_forward()
131 kfree_skb(skb); in br_forward()
135 struct sk_buff *skb, in deliver_clone() argument
137 struct sk_buff *skb)) in deliver_clone()
139 struct net_device *dev = BR_INPUT_SKB_CB(skb)->brdev; in deliver_clone()
141 skb = skb_clone(skb, GFP_ATOMIC); in deliver_clone()
142 if (!skb) { in deliver_clone()
147 __packet_hook(prev, skb); in deliver_clone()
153 struct sk_buff *skb, in maybe_deliver() argument
155 struct sk_buff *skb)) in maybe_deliver()
159 if (!should_deliver(p, skb)) in maybe_deliver()
165 err = deliver_clone(prev, skb, __packet_hook); in maybe_deliver()
174 static void br_flood(struct net_bridge *br, struct sk_buff *skb, in br_flood() argument
177 struct sk_buff *skb), in br_flood() argument
194 BR_INPUT_SKB_CB(skb)->proxyarp_replied) in br_flood()
197 prev = maybe_deliver(prev, p, skb, __packet_hook); in br_flood()
206 deliver_clone(prev, skb, __packet_hook); in br_flood()
208 __packet_hook(prev, skb); in br_flood()
213 kfree_skb(skb); in br_flood()
218 void br_flood_deliver(struct net_bridge *br, struct sk_buff *skb, bool unicast) in br_flood_deliver() argument
220 br_flood(br, skb, NULL, __br_deliver, unicast); in br_flood_deliver()
224 void br_flood_forward(struct net_bridge *br, struct sk_buff *skb, in br_flood_forward() argument
227 br_flood(br, skb, skb2, __br_forward, unicast); in br_flood_forward()
233 struct sk_buff *skb, struct sk_buff *skb0, in br_multicast_flood() argument
236 struct sk_buff *skb)) in br_multicast_flood()
238 struct net_device *dev = BR_INPUT_SKB_CB(skb)->brdev; in br_multicast_flood()
256 prev = maybe_deliver(prev, port, skb, __packet_hook); in br_multicast_flood()
270 deliver_clone(prev, skb, __packet_hook); in br_multicast_flood()
272 __packet_hook(prev, skb); in br_multicast_flood()
277 kfree_skb(skb); in br_multicast_flood()
282 struct sk_buff *skb) in br_multicast_deliver() argument
284 br_multicast_flood(mdst, skb, NULL, __br_deliver); in br_multicast_deliver()
289 struct sk_buff *skb, struct sk_buff *skb2) in br_multicast_forward() argument
291 br_multicast_flood(mdst, skb, skb2, __br_forward); in br_multicast_forward()