route/addr: only sent IFA_FLAGS when needed to workaround picky older kernels
route/addr: only sent IFA_FLAGS when needed to workaround picky older kernels

Older kernels don't accept receiving unknown netlink attributes.
See net/core/rtnetlink.c, rtnetlink_rcv_msg(). This was fixed by kernel
commit 661d2967b3f1b34eeaa7e212e7b9bbe8ee072b59.

As a workaround, only set the additional attributes, when the user
provided flags that makes this necessary and useful.

https://github.com/thom311/libnl/issues/56
https://bugzilla.redhat.com/show_bug.cgi?id=1063885

Based-on-patch-by: Pavel Kankovsky <6a28d069a8addd4ded3cd6e849c49cf42216d91d@argo.troja.mff.cuni.cz>
Acked-by: Thomas Graf <17c2d8920621522552b392f72d8fdb4d1e866b44@suug.ch>
Signed-off-by: Thomas Haller <16e26612e4159990a6b3691e92592e691ff74132@redhat.com>

claudelee/libnl,congwang/libnl,baloo/libnl,dsahern/libnl,baloo/libnl,thom311/libnl,cyclops8456/libnl3,mshirley/libnl,HolyShitMan/libnl-1,dsahern/libnl,greearb/libnl-ct,kolyshkin/libnl,houstar/libnl,thom311/libnl,HolyShitMan/libnl-1,mshirley/libnl,vyos/libnl3,mshirley/libnl,congwang/libnl,congwang/libnl,vyos/libnl3,kolyshkin/libnl,thom311/libnl,dsahern/libnl,tgraf/libnl,UnicronNL/libnl3,cfriedt/libnl,claudelee/libnl,tgraf/libnl,houstar/libnl,HolyShitMan/libnl-1,UnicronNL/libnl3,baloo/libnl,kolyshkin/libnl,dsahern/libnl,honsys/libnl,vyos/libnl3,cfriedt/libnl,cfriedt/libnl,mshirley/libnl,claudelee/libnl,vyos/libnl3,baloo/libnl,claudelee/libnl,cyclops8456/libnl3,houstar/libnl,UnicronNL/libnl3,cfriedt/libnl,tgraf/libnl,houstar/libnl,tgraf/libnl,tklauser/libnl,greearb/libnl-ct,greearb/libnl-ct,tklauser/libnl,HolyShitMan/libnl-1,kolyshkin/libnl,honsys/libnl,tklauser/libnl,UnicronNL/libnl3,honsys/libnl,cyclops8456/libnl3,cyclops8456/libnl3,congwang/libnl,tklauser/libnl,honsys/libnl