aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/libxed.py
diff options
context:
space:
mode:
authorFlorent Fourcot <[email protected]>2022-04-15 18:53:27 +0200
committerPaolo Abeni <[email protected]>2022-04-19 13:38:31 +0200
commitef2a7c9065cea4e3fbc0390e82d05141abbccd7f (patch)
tree702690b8888790a2aad9daf0f7f27afee073344e /tools/perf/scripts/python/libxed.py
parent8b11c35d97946c51bfa2cafd0d0b07ee18f08349 (diff)
rtnetlink: return ENODEV when ifname does not exist and group is given
When the interface does not exist, and a group is given, the given parameters are being set to all interfaces of the given group. The given IFNAME/ALT_IF_NAME are being ignored in that case. That can be dangerous since a typo (or a deleted interface) can produce weird side effects for caller: Case 1: IFLA_IFNAME=valid_interface IFLA_GROUP=1 MTU=1234 Case 1 will update MTU and group of the given interface "valid_interface". Case 2: IFLA_IFNAME=doesnotexist IFLA_GROUP=1 MTU=1234 Case 2 will update MTU of all interfaces in group 1. IFLA_IFNAME is ignored in this case This behaviour is not consistent and dangerous. In order to fix this issue, we now return ENODEV when the given IFNAME does not exist. Signed-off-by: Florent Fourcot <[email protected]> Signed-off-by: Brian Baboch <[email protected]> Reviewed-by: Jakub Kicinski <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/libxed.py')
0 files changed, 0 insertions, 0 deletions