Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/in.c
Show All 30 Lines | |||||
* | * | ||||
* @(#)in.c 8.4 (Berkeley) 1/9/95 | * @(#)in.c 8.4 (Berkeley) 1/9/95 | ||||
*/ | */ | ||||
#include <sys/cdefs.h> | #include <sys/cdefs.h> | ||||
__FBSDID("$FreeBSD$"); | __FBSDID("$FreeBSD$"); | ||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <sys/capsicum.h> | |||||
#include <sys/eventhandler.h> | #include <sys/eventhandler.h> | ||||
#include <sys/systm.h> | #include <sys/systm.h> | ||||
#include <sys/sockio.h> | #include <sys/sockio.h> | ||||
#include <sys/malloc.h> | #include <sys/malloc.h> | ||||
#include <sys/priv.h> | #include <sys/priv.h> | ||||
#include <sys/socket.h> | #include <sys/socket.h> | ||||
#include <sys/jail.h> | #include <sys/jail.h> | ||||
#include <sys/kernel.h> | #include <sys/kernel.h> | ||||
▲ Show 20 Lines • Show All 184 Lines • ▼ Show 20 Lines | in_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp, | ||||
struct sockaddr_in *addr = (struct sockaddr_in *)&ifr->ifr_addr; | struct sockaddr_in *addr = (struct sockaddr_in *)&ifr->ifr_addr; | ||||
struct epoch_tracker et; | struct epoch_tracker et; | ||||
struct ifaddr *ifa; | struct ifaddr *ifa; | ||||
struct in_ifaddr *ia; | struct in_ifaddr *ia; | ||||
int error; | int error; | ||||
if (ifp == NULL) | if (ifp == NULL) | ||||
return (EADDRNOTAVAIL); | return (EADDRNOTAVAIL); | ||||
if (td != NULL && IN_CAPABILITY_MODE(td)) | |||||
oshogbo: Shouldn't w do this check eariler? | |||||
Done Inline ActionsAssuming you mean reordering with the ifp == NULL check, sure, but again I don't really understand why. markj: Assuming you mean reordering with the `ifp == NULL` check, sure, but again I don't really… | |||||
return (ECAPMODE); | |||||
/* | /* | ||||
* Filter out 4 ioctls we implement directly. Forward the rest | * Filter out 4 ioctls we implement directly. Forward the rest | ||||
* to specific functions and ifp->if_ioctl(). | * to specific functions and ifp->if_ioctl(). | ||||
*/ | */ | ||||
switch (cmd) { | switch (cmd) { | ||||
case SIOCGIFADDR: | case SIOCGIFADDR: | ||||
case SIOCGIFBRDADDR: | case SIOCGIFBRDADDR: | ||||
▲ Show 20 Lines • Show All 1,465 Lines • Show Last 20 Lines |
Shouldn't w do this check eariler?