[PATCH 1/3] Allow override of message type during link change

Thomas Haller thaller at redhat.com
Mon Aug 29 04:13:57 PDT 2016


On Fri, 2016-08-26 at 19:19 -0700, Jef Oliver wrote:
> When rtnl_link_build_change_request() builds a change request,
> it sets the message type to RTM_NEWLINK by default. If the
> request fails, it changes the type to RTM_SETLINK, and resubmits.
> 
> For some address families, this will result in a requested change
> never being applied by the kernel. An exmaple of this is the Linux
> bridge. When a netlink message of type RTM_NEWLINK is recieved,
> rather than failing, it simply ignores the message and does not
> return a failure.
> 
> To fix this, this patch implements an override for address
> families that require it. The override can be set when an address
> family registers itself in libnl.
> 
> This patch adds ao_override_rtm to the rtnl_link_af_ops structure.
> This patch adds a static function named af_request_type.
> This patch modifies rtnl_link_build_change_request to call
>   af_request_type to properly set the request type if an address
>   family wishes to override.
> 
> Signed-off-by: Jef Oliver <jef.oliver at intel.com>
> ---

hi Jef,

merged the three patches:

https://github.com/thom311/libnl/commit/7bf2e64654de75578db34b0eab53a3e4d106d65f

Thank you,
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/libnl/attachments/20160829/fcc68784/attachment.sig>


More information about the libnl mailing list