On 17 June 2018 at 13:30, Arturo Borrero Gonzalez <arturo@xxxxxxxxxxxxx> wrote: > On 17 June 2018 at 09:22, Phil Sutter <phil@xxxxxx> wrote: >> With libnftables documentation being upstream and one confirmed external >> user (nftlb), time to break the API! >> >> First of all, the command buffer passed to nft_run_cmd_from_buffer may >> (and should) be const. One should consider it a bug if that function >> ever changed it's content. >> >> On the other hand, there is no point in passing the buffer's length as >> separate argument: NULL bytes are not expected to occur in the input, so >> it is safe to rely upon strlen(). Also, the actual parsers don't require >> a buffer length passed to them, either. The only use-case for it is when >> reallocating the buffer to append a final newline character, there >> strlen() is perfectly sufficient. >> >> Suggested-by: Harald Welte <laforge@xxxxxxxxxxxx> >> Cc: Laura Garcia Liebana <nevola@xxxxxxxxx> >> Cc: Eric Leblond <eric@xxxxxxxxx> >> Signed-off-by: Phil Sutter <phil@xxxxxx> > > We should bump the library SONAME with this change to reflect the API change. > > Please send a follow-up patch (or v2 if you want). We would probably need something like in libnftnl: LIBVERSION=10:0:3 http://git.netfilter.org/libnftnl/tree/Make_global.am -- 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