net_tstamp: Add SIOCGHWTSTAMP ioctl to match SIOCSHWTSTAMP
SIOCSHWTSTAMP returns the real configuration to the application using it, but there is currently no way for any other application to find out the configuration non-destructively. Add a new ioctl for this, making it unprivileged. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
This commit is contained in:
parent
590d4693fb
commit
fd468c74bd
5 changed files with 19 additions and 10 deletions
|
|
@ -327,6 +327,7 @@ static int dev_ifsioc(struct net *net, struct ifreq *ifr, unsigned int cmd)
|
|||
cmd == SIOCBRADDIF ||
|
||||
cmd == SIOCBRDELIF ||
|
||||
cmd == SIOCSHWTSTAMP ||
|
||||
cmd == SIOCGHWTSTAMP ||
|
||||
cmd == SIOCWANDEV) {
|
||||
err = -EOPNOTSUPP;
|
||||
if (ops->ndo_do_ioctl) {
|
||||
|
|
@ -546,6 +547,7 @@ int dev_ioctl(struct net *net, unsigned int cmd, void __user *arg)
|
|||
*/
|
||||
default:
|
||||
if (cmd == SIOCWANDEV ||
|
||||
cmd == SIOCGHWTSTAMP ||
|
||||
(cmd >= SIOCDEVPRIVATE &&
|
||||
cmd <= SIOCDEVPRIVATE + 15)) {
|
||||
dev_load(net, ifr.ifr_name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue