Re: [libnftnl PATCH] set: add helper to get the first set_elem

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

 



On Tue, Apr 15, 2014 at 10:04:32AM +0200, Patrick McHardy wrote:
> On Tue, Apr 15, 2014 at 09:58:42AM +0200, Arturo Borrero Gonzalez wrote:
> > Add a helper that returns a pointer to the first set_elem in a given set.
> > 
> > This function is useful in situations where you know the set only have one
> > element (ie, event reporting from the kernel).
> 
> That doesn't seem right to me. As I said in my review of the notification
> patch, userspace *must* be prepared for multiple elements being reported
> at once since it is very likely that we will change the kernel side in
> the future for efficiency reasons.

I see. Arturo, you have to consider that the set may have more than
one element in the event from userspace, even if currently we only
have one single element. So use the set iterator to print all the
elements in the set instead.
--
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