Merge branch 'rtnetlink-improve-alt_ifname-config-and-fix-dangerous-group-usage'
authorPaolo Abeni <pabeni@redhat.com>
Tue, 19 Apr 2022 11:39:01 +0000 (13:39 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 19 Apr 2022 11:39:01 +0000 (13:39 +0200)
commitcc4bdef26ecd56de16a04bc6d99aa10ff9076498
tree6f6db5473f8f7ad9031057056f2d0979b67ce96b
parent8b11c35d97946c51bfa2cafd0d0b07ee18f08349
parentb6177d3240a4f58fe547891010ad77a45bc1c9ab
Merge branch 'rtnetlink-improve-alt_ifname-config-and-fix-dangerous-group-usage'

Florent Fourcot says:

====================
rtnetlink: improve ALT_IFNAME config and fix dangerous GROUP usage

First commit forbids dangerous calls when both IFNAME and GROUP are
given, since it can introduce unexpected behaviour when IFNAME does not
match any interface.

Second patch achieves primary goal of this patchset to fix/improve
IFLA_ALT_IFNAME attribute, since previous code was never working for
newlink/setlink. ip-link command is probably getting interface index
before, and was not using this feature.

Last two patches are improving error code on corner cases.

Changes in v2:
  * Remove ifname argument in rtnl_dev_get/do_setlink
    functions (simplify code)
  * Use a boolean to avoid condition duplication in __rtnl_newlink

Changes in v3:
  * Simplify rtnl_dev_get signature

Changes in v4:
  * Rename link_lookup to link_specified

Changes in v5:
  * Re-order patches
====================

Link: https://lore.kernel.org/r/20220415165330.10497-1-florent.fourcot@wifirst.fr
Signed-off-by: Paolo Abeni <pabeni@redhat.com>