> On 15 Jun 2023, at 15:33, Ondrej Zajicek <santi...@crfreenet.org> wrote:
> 
> On Wed, Jun 14, 2023 at 02:54:49PM +0200, Luiz Amaral wrote:
>> Hello,
>>> I did not find any other patch (for Netlink) in that thread, but i could
>>> try to hack it myself.
>> 
>> Here is the patch as an attachment.
> 
> Merged. It breaks build for some very old Linux systems (e.g. Debian 8,
> CentOS 7), as HAVE_MPLS_KERNEL also checks for struct rtvia existence,
> but these systems have obsolete/unsupported kernel versions anyways.
> 
> There is a question how handle feature divergence (primarily divergence
> in which structures and enum values are defined for compile-time) in
> Netlink between Linux and FreeBSD. I would prefer to not have autoconf
> test for each such feature. For example we could probably remove
> HAVE_MPLS_KERNEL altogether just for Linux (as the check is unnecessary
> for non-obsolete kernels, but i am not sure about FreeBSD headers).
I understand the pain. To add to this, the feature existence doesn’t always 
mean the full feature parity.
For example, current nexthop/nexthop group implementation doesn’t have the 
support for adding resilient nexthop groups.

The only solution I could think of is adding a bit of ugliness to the headers 
and have the defines for each enum item (for commands) and a separate define 
for the structures / small enums.
Then the features could be defined in the sysdep/<flavor>/netlink-sys.h .

What do you think?
> 
> -- 
> Elen sila lumenn' omentielvo
> 
> Ondrej 'Santiago' Zajicek (email: santi...@crfreenet.org)
> OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
> "To err is human -- to blame it on a computer is even more so."


Reply via email to