Re: [PATCH v2 1/4] ipv4: add option to drop unicast encapsulated in L2 multicast

2015-11-05 Thread Julian Anastasov
Hello, On Wed, 4 Nov 2015, Johannes Berg wrote: > On Wed, 2015-11-04 at 22:59 +0200, Julian Anastasov wrote: > >  > > } else if (unlikely(skb->pkt_type != PACKET_HOST)) { > > > > May be such check can save some cycles because > > it is more common to see PACKET_HOST pack

Re: [PATCH v2 1/4] ipv4: add option to drop unicast encapsulated in L2 multicast

2015-11-04 Thread Johannes Berg
On Wed, 2015-11-04 at 22:59 +0200, Julian Anastasov wrote: >  > Patches 1 and 3 look correct to me, > > Reviewed-by: Julian Anastasov Thanks for checking! > If the patches are lost in the merge window you > can also consider one minor optimization, see below... Oh, yeah, they p

Re: [PATCH v2 1/4] ipv4: add option to drop unicast encapsulated in L2 multicast

2015-11-04 Thread Julian Anastasov
Hello, On Wed, 4 Nov 2015, Johannes Berg wrote: > From: Johannes Berg > > In order to solve a problem with 802.11, the so-called hole-196 attack, > add an option (sysctl) called "drop_unicast_in_l2_multicast" which, if > enabled, causes the stack to drop IPv4 unicast packets encapsulat

[PATCH v2 1/4] ipv4: add option to drop unicast encapsulated in L2 multicast

2015-11-04 Thread Johannes Berg
From: Johannes Berg In order to solve a problem with 802.11, the so-called hole-196 attack, add an option (sysctl) called "drop_unicast_in_l2_multicast" which, if enabled, causes the stack to drop IPv4 unicast packets encapsulated in link-layer multi- or broadcast frames. Such frames can (as an a