if.c (223625) | if.c (223735) |
---|---|
1/*- 2 * Copyright (c) 1980, 1986, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)if.c 8.5 (Berkeley) 1/9/95 | 1/*- 2 * Copyright (c) 1980, 1986, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)if.c 8.5 (Berkeley) 1/9/95 |
30 * $FreeBSD: head/sys/net/if.c 223625 2011-06-28 08:41:44Z pluknet $ | 30 * $FreeBSD: head/sys/net/if.c 223735 2011-07-03 12:22:02Z bz $ |
31 */ 32 33#include "opt_compat.h" 34#include "opt_inet6.h" 35#include "opt_inet.h" 36 37#include <sys/param.h> 38#include <sys/types.h> --- 14 unchanged lines hidden (view full) --- 53#include <sys/module.h> 54#include <sys/rwlock.h> 55#include <sys/sockio.h> 56#include <sys/syslog.h> 57#include <sys/sysctl.h> 58#include <sys/taskqueue.h> 59#include <sys/domain.h> 60#include <sys/jail.h> | 31 */ 32 33#include "opt_compat.h" 34#include "opt_inet6.h" 35#include "opt_inet.h" 36 37#include <sys/param.h> 38#include <sys/types.h> --- 14 unchanged lines hidden (view full) --- 53#include <sys/module.h> 54#include <sys/rwlock.h> 55#include <sys/sockio.h> 56#include <sys/syslog.h> 57#include <sys/sysctl.h> 58#include <sys/taskqueue.h> 59#include <sys/domain.h> 60#include <sys/jail.h> |
61#include <sys/priv.h> 62 |
|
61#include <machine/stdarg.h> 62#include <vm/uma.h> 63 64#include <net/if.h> 65#include <net/if_arp.h> 66#include <net/if_clone.h> 67#include <net/if_dl.h> 68#include <net/if_types.h> --- 2061 unchanged lines hidden (view full) --- 2130 odescrbuf = ifp->if_description; 2131 ifp->if_description = descrbuf; 2132 sx_xunlock(&ifdescr_sx); 2133 2134 getmicrotime(&ifp->if_lastchange); 2135 free(odescrbuf, M_IFDESCR); 2136 break; 2137 | 63#include <machine/stdarg.h> 64#include <vm/uma.h> 65 66#include <net/if.h> 67#include <net/if_arp.h> 68#include <net/if_clone.h> 69#include <net/if_dl.h> 70#include <net/if_types.h> --- 2061 unchanged lines hidden (view full) --- 2132 odescrbuf = ifp->if_description; 2133 ifp->if_description = descrbuf; 2134 sx_xunlock(&ifdescr_sx); 2135 2136 getmicrotime(&ifp->if_lastchange); 2137 free(odescrbuf, M_IFDESCR); 2138 break; 2139 |
2140 case SIOCGIFFIB: 2141 ifr->ifr_fib = ifp->if_fib; 2142 break; 2143 2144 case SIOCSIFFIB: 2145 error = priv_check(td, PRIV_NET_SETIFFIB); 2146 if (error) 2147 return (error); 2148 if (ifr->ifr_fib >= rt_numfibs) 2149 return (EINVAL); 2150 2151 ifp->if_fib = ifr->ifr_fib; 2152 break; 2153 |
|
2138 case SIOCSIFFLAGS: 2139 error = priv_check(td, PRIV_NET_SETIFFLAGS); 2140 if (error) 2141 return (error); 2142 /* 2143 * Currently, no driver owned flags pass the IFF_CANTCHANGE 2144 * check, so we don't need special handling here yet. 2145 */ --- 1262 unchanged lines hidden --- | 2154 case SIOCSIFFLAGS: 2155 error = priv_check(td, PRIV_NET_SETIFFLAGS); 2156 if (error) 2157 return (error); 2158 /* 2159 * Currently, no driver owned flags pass the IFF_CANTCHANGE 2160 * check, so we don't need special handling here yet. 2161 */ --- 1262 unchanged lines hidden --- |