lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 10 Dec 2009 21:17:12 -0800 From: Jay Vosburgh <fubar@...ibm.com> To: Andy Gospodarek <andy@...yhouse.net> cc: Eric Dumazet <eric.dumazet@...il.com>, netdev@...r.kernel.org Subject: Re: [PATCH net-next-2.6 v3] bonding: allow arp_ip_targets on separate vlans to use arp validation Andy Gospodarek <andy@...yhouse.net> wrote: >[...] Here is the updated patch: > >[PATCH net-next-2.6 v3] bonding: allow arp_ip_targets on separate vlans to use arp validation > >This allows a bond device to specify an arp_ip_target as a host that is >not on the same vlan as the base bond device and still use arp >validation. A configuration like this, now works: [...] I'm testing with one modification to your patch (the change from your patch is below). The gist of this change is to use "null_or_orig" instead of adding a new variable "null_or_bond." I believe this is safe, as null_or_orig should currently only be set for non-VLAN traffic (VLAN traffic won't pass the "orig_dev->master" test; the VLAN code itself does the skb_bond_should_drop stuff), and the null_or_bond is/was only used for VLAN traffic. This patch has a debug printk in it right now for testing until I'm sure I'm not confused. Thoughts? -J diff --git a/net/core/dev.c b/net/core/dev.c index 0c96321..ac47be9 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -2422,7 +2422,6 @@ int netif_receive_skb(struct sk_buff *skb) struct packet_type *ptype, *pt_prev; struct net_device *orig_dev; struct net_device *null_or_orig; - struct net_device *null_or_bond; int ret = NET_RX_DROP; __be16 type; @@ -2494,17 +2493,18 @@ ncls: * device that may have registered for a specific ptype. The * handler will have to adjust skb->dev and orig_dev though. */ - null_or_bond = NULL; if ((skb->dev->priv_flags & IFF_802_1Q_VLAN) && (vlan_dev_real_dev(skb->dev)->priv_flags & IFF_BONDING)) { - null_or_bond = vlan_dev_real_dev(skb->dev); + if (null_or_orig) + printk(KERN_ERR "BAD: n_o_o %p %s\n", null_or_orig, + null_or_orig->name); + null_or_orig = vlan_dev_real_dev(skb->dev); } type = skb->protocol; list_for_each_entry_rcu(ptype, &ptype_base[ntohs(type) & PTYPE_HASH_MASK], list) { - if (ptype->type == type && - (ptype->dev == null_or_orig || ptype->dev == null_or_bond || + if (ptype->type == type && (ptype->dev == null_or_orig || ptype->dev == skb->dev || ptype->dev == orig_dev)) { if (pt_prev) ret = deliver_skb(skb, pt_prev, orig_dev); --- -Jay Vosburgh, IBM Linux Technology Center, fubar@...ibm.com -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists