OSDN Git Service

rtnetlink: enable IFLA_IF_NETNSID for RTM_DELLINK
authorChristian Brauner <christianvanbrauner@gmail.com>
Wed, 24 Jan 2018 14:26:34 +0000 (15:26 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 29 Jan 2018 16:31:06 +0000 (11:31 -0500)
commitb61ad68a9fe85d29d5363eb36860164a049723cf
treed08ca8888d76c28e4ebc7dc6982de304ec0cc44c
parentc310bfcb6e1be993629c5747accf8e1c65fbb255
rtnetlink: enable IFLA_IF_NETNSID for RTM_DELLINK

- Backwards Compatibility:
  If userspace wants to determine whether RTM_DELLINK supports the
  IFLA_IF_NETNSID property they should first send an RTM_GETLINK request
  with IFLA_IF_NETNSID on lo. If either EACCESS is returned or the reply
  does not include IFLA_IF_NETNSID userspace should assume that
  IFLA_IF_NETNSID is not supported on this kernel.
  If the reply does contain an IFLA_IF_NETNSID property userspace
  can send an RTM_DELLINK with a IFLA_IF_NETNSID property. If they receive
  EOPNOTSUPP then the kernel does not support the IFLA_IF_NETNSID property
  with RTM_DELLINK. Userpace should then fallback to other means.

- Security:
  Callers must have CAP_NET_ADMIN in the owning user namespace of the
  target network namespace.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/rtnetlink.c