Re: [PATCH nf-next v2 1/1] ipv6: defrag: drop non-last frags smaller than min mtu

2018-08-02 Thread Stephen Hemminger
On Fri, 3 Aug 2018 02:05:39 +0200 Florian Westphal wrote: > + if (-skb_network_offset(skb) + skb->len < IPV6_MIN_MTU && Is there a reason to write the arithmetic expression in this order? Why not: if (skb->len - skb_network_offset(skb) < IPV6_MIN_MTU &&

[PATCH nf-next v2 1/1] ipv6: defrag: drop non-last frags smaller than min mtu

2018-08-02 Thread Florian Westphal
don't bother with pathological cases, they only waste cycles. IPv6 requires a minimum MTU of 1280 so we should never see fragments smaller than this (except last frag). v2: drop IPv4 part, which added same check w. IPV4_MIN_MTU (68). There were concerns that there could be even smaller frags