]> git.ipfire.org Git - thirdparty/iproute2.git/commit
iproute2: bugfix - restore ip monitor backward compatibility.
authorYuyang Huang <yuyanghuang@google.com>
Fri, 23 May 2025 03:25:18 +0000 (12:25 +0900)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 26 May 2025 15:17:46 +0000 (08:17 -0700)
commit969817ce1ddb1aab375d74d0eee6454c13656f84
tree5cf9900e22db4df231f6849d1e96bfbf875e6bb0
parentf93a8f8952f0965d18b8c6751b07fe42c61b15c0
iproute2: bugfix - restore ip monitor backward compatibility.

The current ip monitor implementation fails on older kernels that lack
newer RTNLGRP_* definitions. As ip monitor is expected to maintain
backward compatibility, this commit updates the code to check if errno
is not EINVAL when rtnl_add_nl_group() fails. This change restores ip
monitor's backward compatibility with older kernel versions.

Cc: David Ahern <dsahern@kernel.org>
Cc: Luca Boccassi <bluca@debian.org>
Cc: Maciej Żenczykowski <maze@google.com>
Cc: Lorenzo Colitti <lorenzo@google.com>
Reported-by: Adel Belhouane <bugs.a.b@free.fr>
Fixes: 19514606dce3 ("iproute2: add 'ip monitor maddress' support")
Closes: https://lore.kernel.org/netdev/CADXeF1GgJ_1tee3hc7gca2Z21Lyi3mzxq52sSfMg3mFQd2rGWQ@mail.gmail.com/T/#t
Signed-off-by: Yuyang Huang <yuyanghuang@google.com>
Tested-by: Luca Boccassi <bluca@debian.org>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
ip/ipmonitor.c