Re: [PATCH 4/5] netfilter: nfnetlink_queue: add skb info attribute

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eric Dumazet <eric.dumazet@xxxxxxxxx> wrote:
> On Tue, 2013-04-16 at 17:32 +0200, Florian Westphal wrote:
> > Once we allow userspace to receive gso/gro packets, userspace
> > needs to be able to determine when checksums appear to be
> > broken, but are not.
> > 
> > NFQA_SKB_CSUMNOTREADY means 'checksums will be fixed in kernel
> > later, pretend they are ok'.
> > 
> > NFQA_SKB_GSO could be used for statistics, or to determine when
> > packet size exceeds mtu.

[..]

> > +static int nfqnl_put_packet_info(struct sk_buff *nlskb, struct sk_buff *packet)
> > +{
> > +	__u32 flags = 0;
> > +
> > +	if (skb_is_gso(packet))
> > +		flags = NFQA_SKB_GSO;
>  
> > +	if (packet->ip_summed == CHECKSUM_PARTIAL)
> > +		flags |= NFQA_SKB_CSUMNOTREADY;
> > +
> > +	return nla_put_be32(nlskb, NFQA_SKB_INFO, htonl(flags));
> 
> Maybe you could avoid sending NFQA_SKB_INFO if flags == 0 ?

Sure, will change it in the next round.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux