diff options
author | Pawel Biernacki <kaktus@FreeBSD.org> | 2020-06-21 18:40:17 +0000 |
---|---|---|
committer | Pawel Biernacki <kaktus@FreeBSD.org> | 2020-06-21 18:40:17 +0000 |
commit | 9daf71541cf685e41e90920c5c1c64ab3b5940d1 (patch) | |
tree | 0e0c442f8b55af927ce059513dd8c1c98bad24db /sys/net | |
parent | 7747001b125d7bdc64fa4b06fa4d6b940e38453f (diff) | |
download | src-9daf71541cf685e41e90920c5c1c64ab3b5940d1.tar.gz src-9daf71541cf685e41e90920c5c1c64ab3b5940d1.zip |
net.link.generic.ifdata.<ifindex>.linkspecific: rework handler
This OID was added in r17352 but the write path of IFDATA_LINKSPECIFIC
seems unused as there are no in-base writers, and as far as I can tell
we had issues with this code before, see PR 219472. Drop the write path
to make the handler read-only as described in comments and man-pages.
It can be marked as MPSAFE now.
Reviewed by: bdragon, kib, melifaro, wollman
Approved by: kib (mentor)
Sponsored by: Mysterious Code Ltd.
Differential Revision: https://reviews.freebsd.org/D25348
Notes
Notes:
svn path=/head/; revision=362468
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_mib.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/sys/net/if_mib.c b/sys/net/if_mib.c index ff5e61029762..b2646ce4cb1b 100644 --- a/sys/net/if_mib.c +++ b/sys/net/if_mib.c @@ -122,10 +122,6 @@ sysctl_ifdata(SYSCTL_HANDLER_ARGS) /* XXX bad syntax! */ error = SYSCTL_OUT(req, ifp->if_linkmib, ifp->if_linkmiblen); if (error || !req->newptr) goto out; - - error = SYSCTL_IN(req, ifp->if_linkmib, ifp->if_linkmiblen); - if (error) - goto out; break; case IFDATA_DRIVERNAME: @@ -152,6 +148,6 @@ out: } static SYSCTL_NODE(_net_link_generic, IFMIB_IFDATA, ifdata, - CTLFLAG_RW | CTLFLAG_NEEDGIANT, sysctl_ifdata, + CTLFLAG_RD | CTLFLAG_MPSAFE, sysctl_ifdata, "Interface table"); |