summaryrefslogtreecommitdiffstats
path: root/sys/net/if.c
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2009-11-12 19:02:10 +0000
committerdelphij <delphij@FreeBSD.org>2009-11-12 19:02:10 +0000
commit8fed657163fb373990aaa15c79b58a7c963373b2 (patch)
tree16ac7b8e4875faf8659392bffa9753b287fa7398 /sys/net/if.c
parent2f448a4a2a88e26012aba2a9ddf375e1a9f2eed1 (diff)
downloadFreeBSD-src-8fed657163fb373990aaa15c79b58a7c963373b2.zip
FreeBSD-src-8fed657163fb373990aaa15c79b58a7c963373b2.tar.gz
Revert revision 199201 for now as it has introduced a kernel vulnerability
and requires more polishing.
Diffstat (limited to 'sys/net/if.c')
-rw-r--r--sys/net/if.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index 4ba453a..55de666 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -463,8 +463,6 @@ if_free_internal(struct ifnet *ifp)
#ifdef MAC
mac_ifnet_destroy(ifp);
#endif /* MAC */
- if (ifp->if_description != NULL)
- sbuf_delete(ifp->if_description);
IF_AFDATA_DESTROY(ifp);
IF_ADDR_LOCK_DESTROY(ifp);
ifq_delete(&ifp->if_snd);
@@ -2092,45 +2090,6 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data, struct thread *td)
ifr->ifr_phys = ifp->if_physical;
break;
- case SIOCGIFDESCR:
- IF_AFDATA_RLOCK(ifp);
- if (ifp->if_description == NULL)
- error = ENOMSG;
- else
- error = copystr(sbuf_data(ifp->if_description),
- ifr->ifr_buffer.buffer,
- ifr->ifr_buffer.length, NULL);
- IF_AFDATA_RUNLOCK(ifp);
- break;
-
- case SIOCSIFDESCR:
- error = priv_check(td, PRIV_NET_SETIFDESCR);
- if (error)
- return (error);
-
- IF_AFDATA_WLOCK(ifp);
- if (ifp->if_description == NULL) {
- ifp->if_description = sbuf_new_auto();
- if (ifp->if_description == NULL) {
- error = ENOMEM;
- IF_AFDATA_WUNLOCK(ifp);
- break;
- }
- } else
- sbuf_clear(ifp->if_description);
-
- if (sbuf_copyin(ifp->if_description, ifr->ifr_buffer.buffer,
- ifr->ifr_buffer.length) == -1)
- error = EFAULT;
-
- if (error == 0) {
- sbuf_finish(ifp->if_description);
- getmicrotime(&ifp->if_lastchange);
- }
- IF_AFDATA_WUNLOCK(ifp);
-
- break;
-
case SIOCSIFFLAGS:
error = priv_check(td, PRIV_NET_SETIFFLAGS);
if (error)
OpenPOWER on IntegriCloud