diff options
author | Hangbin Liu <liuhangbin@gmail.com> | 2025-05-08 03:54:14 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-05-22 14:29:39 +0200 |
commit | 37050be74e806f3ce00716f470e4e9dca3d0d0fb (patch) | |
tree | 46bd57e21604d6eb4c124703902ccb547e95f99a /net/lapb/lapb_timer.c | |
parent | d1365ca80b012d8a7863e45949e413fb61fa4861 (diff) |
tools/net/ynl: ethtool: fix crash when Hardware Clock info is missing
[ Upstream commit 45375814eb3f4245956c0c85092a4eee4441d167 ]
Fix a crash in the ethtool YNL implementation when Hardware Clock information
is not present in the response. This ensures graceful handling of devices or
drivers that do not provide this optional field. e.g.
Traceback (most recent call last):
File "/net/tools/net/ynl/pyynl/./ethtool.py", line 438, in <module>
main()
~~~~^^
File "/net/tools/net/ynl/pyynl/./ethtool.py", line 341, in main
print(f'PTP Hardware Clock: {tsinfo["phc-index"]}')
~~~~~~^^^^^^^^^^^^^
KeyError: 'phc-index'
Fixes: f3d07b02b2b8 ("tools: ynl: ethtool testing tool")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Link: https://patch.msgid.link/20250508035414.82974-1-liuhangbin@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/lapb/lapb_timer.c')
0 files changed, 0 insertions, 0 deletions