[systemd-devel] [PATCH] network: Implement fallback DHCPv6 prefix handling for older kernels

Lennart Poettering lennart at poettering.net
Thu Apr 9 03:43:28 PDT 2015


On Thu, 09.04.15 13:37, Patrik Flykt (patrik.flykt at linux.intel.com) wrote:

>  src/libsystemd/sd-rtnl/rtnl-types.c |  2 ++
>  src/network/networkd-address.c      |  5 +++-
>  src/network/networkd-dhcp6.c        | 55 +++++++++++++++++++++++++++++++++++--
>  src/network/networkd-link.c         |  4 +++
>  src/network/networkd-link.h         |  2 ++
>  5 files changed, 65 insertions(+), 3 deletions(-)
> 
> diff --git a/src/libsystemd/sd-rtnl/rtnl-types.c b/src/libsystemd/sd-rtnl/rtnl-types.c
> index 49784bf..407b749 100644
> --- a/src/libsystemd/sd-rtnl/rtnl-types.c
> +++ b/src/libsystemd/sd-rtnl/rtnl-types.c
> @@ -360,7 +360,9 @@ static const NLType rtnl_address_types[CONST_MAX(IFA_MAX, IFA_FLAGS) + 1] = {
>          [IFA_ANYCAST],
>          [IFA_MULTICAST],
>  */
> +#if HAVE_DECL_IFA_FLAGS
>          [IFA_FLAGS]             = { .type = NLA_U32 },
> +#endif
>  };

Hmm, in general, we really should try to create the same binaries,
regardless if we are built on an old or new kernel. And the binaries
should work as good as possible, regardless which kernel version they
are running on. But with the change above the binary built on a newer
kernel work differently from an older kernel, even though we added the
definition to missing.h to make the distinction go away...

Or in other words: we try to do runtime compat, not just compile time
compat, so that we don't strictly have to sync kernel and userspace
updated.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list