]> git.baikalelectronics.ru Git - kernel.git/commit
Bonding: force user to add HWTSTAMP_FLAG_BONDED_PHC_INDEX when get/set HWTSTAMP
authorHangbin Liu <liuhangbin@gmail.com>
Fri, 10 Dec 2021 08:59:59 +0000 (16:59 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Dec 2021 12:28:24 +0000 (12:28 +0000)
commit204df4225d3192b09bdc4077911791d3d5e30fcb
treed0589dd9852ae75573cf70f53e0d920bdeb63eb2
parent42faab4237cea60a9b1ffb76e67e5200254fe2b6
Bonding: force user to add HWTSTAMP_FLAG_BONDED_PHC_INDEX when get/set HWTSTAMP

When there is a failover, the PHC index of bond active interface will be
changed. This may break the user space program if the author didn't aware.

By setting this flag, the user should aware that the PHC index get/set
by syscall is not stable. And the user space is able to deal with it.
Without this flag, the kernel will reject the request forwarding to
bonding.

Reported-by: Jakub Kicinski <kuba@kernel.org>
Fixes: 2d033852772f ("bond: pass get_ts_info and SIOC[SG]HWTSTAMP ioctl to active device")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_main.c