ip: revert including new features in all cases
Subsystems (2)
RFC 1/1 ip: revert including new features in all cases
The problem is ip commands built from latest version still have to run on older kernels. Running current "ip monitor" on older kernels would fail because it could not add the group for stats since rtnl group for stats was not added until 5.18 kernel.
The proposed solution is to revert the inclusion of new features that could be rejected by older kernels from the default "all" setting of ip monitor.
This effectively reverts commit 4e8a9914c4d459be57ddedf1df35b315e7fea8a5.
Signed-off-by Stephen Hemminger <[email protected]>
--- ip/ipmonitor.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
ip/ipmonitor.c +6 -1
@@ -190,7 +190,12 @@ static int accept_msg(struct rtnl_ctrl_data *ctrl,#define IPMON_LNSID BIT(9)#define IPMON_LNEXTHOP BIT(10) -#define IPMON_L_ALL (~0) +/* All only includes those bit supported by older kernels */ +#define IPMON_L_ALL (IPMON_LLINK | IPMON_LADDR | \ + IPMON_LROUTE | IPMON_LMROUTE | \ + IPMON_LPREFIX | IPMON_LNEIGH | \ + IPMON_LNETCONF | IPMON_LRULE | \ + IPMON_LNSID)int do_ipmonitor (int argc,char **argv) {
Signature · 1 line
2.35.1