On 17 June 2018 at 09:22, Phil Sutter <[email protected]> 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 <[email protected]>
> Cc: Laura Garcia Liebana <[email protected]>
> Cc: Eric Leblond <[email protected]>
> Signed-off-by: Phil Sutter <[email protected]>

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).
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to