Jan Engelhardt <jengelh@xxxxxxx> wrote: > On Thursday 2016-03-03 18:56, Florian Westphal wrote: > > >The float value has to be in range of 0.0000001 to 0.9999999 and > >+ > >+ if (tmp >= UINT_MAX || d > 0.9999999) > >+ return error(loc, "Probability " META_PROB_FMT " too %s", d, "big"); > > You are misappropriating some 430 points here. 0.9999999 maps to > just 0xfffffe51. Sorry, I am not following. What would you likew to change here? > >+ *value = (uint32_t) tmp; > >+ if (*value == 0) > >+ return error(loc, "Probability " META_PROB_FMT " too %s", d, "small"); > > Though d==0 and d==1 are not overly useful, why prohibit them? iptables > allowed taking them, and I hear people are working on a translator...*boom* No, thats easy to translate to nft :-) 1.0 -> "" 0.0 -> "#" i.e. not print a "1.0" match, its always true so irrelevant and print comment a sign (#) to make nft ignore whatever comes after it, since it did not match in the iptables rule either. -- 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