|
@@ -2495,12 +2495,26 @@ ncls:
|
|
if (!skb)
|
|
if (!skb)
|
|
goto out;
|
|
goto out;
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * Make sure frames received on VLAN interfaces stacked on
|
|
|
|
+ * bonding interfaces still make their way to any base bonding
|
|
|
|
+ * device that may have registered for a specific ptype. The
|
|
|
|
+ * handler may have to adjust skb->dev and orig_dev.
|
|
|
|
+ *
|
|
|
|
+ * null_or_orig can be overloaded since it will not be set when
|
|
|
|
+ * using VLANs on top of bonding. Putting it here prevents
|
|
|
|
+ * disturbing the ptype_all handlers above.
|
|
|
|
+ */
|
|
|
|
+ if ((skb->dev->priv_flags & IFF_802_1Q_VLAN) &&
|
|
|
|
+ (vlan_dev_real_dev(skb->dev)->priv_flags & IFF_BONDING)) {
|
|
|
|
+ null_or_orig = vlan_dev_real_dev(skb->dev);
|
|
|
|
+ }
|
|
|
|
+
|
|
type = skb->protocol;
|
|
type = skb->protocol;
|
|
list_for_each_entry_rcu(ptype,
|
|
list_for_each_entry_rcu(ptype,
|
|
&ptype_base[ntohs(type) & PTYPE_HASH_MASK], list) {
|
|
&ptype_base[ntohs(type) & PTYPE_HASH_MASK], list) {
|
|
- if (ptype->type == type &&
|
|
|
|
- (ptype->dev == null_or_orig || ptype->dev == skb->dev ||
|
|
|
|
- ptype->dev == orig_dev)) {
|
|
|
|
|
|
+ if (ptype->type == type && (ptype->dev == null_or_orig ||
|
|
|
|
+ ptype->dev == skb->dev || ptype->dev == orig_dev)) {
|
|
if (pt_prev)
|
|
if (pt_prev)
|
|
ret = deliver_skb(skb, pt_prev, orig_dev);
|
|
ret = deliver_skb(skb, pt_prev, orig_dev);
|
|
pt_prev = ptype;
|
|
pt_prev = ptype;
|