if.c (185348) | if.c (185435) |
---|---|
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 185348 2008-11-26 22:32:07Z zec $ | 30 * $FreeBSD: head/sys/net/if.c 185435 2008-11-29 14:32:14Z bz $ |
31 */ 32 33#include "opt_compat.h" 34#include "opt_inet6.h" 35#include "opt_inet.h" 36#include "opt_mac.h" 37#include "opt_carp.h" 38 --- 2167 unchanged lines hidden (view full) --- 2206 return (ENAMETOOLONG); 2207 } 2208 2209 addrs = 0; 2210 TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { 2211 struct sockaddr *sa = ifa->ifa_addr; 2212 2213 if (jailed(curthread->td_ucred) && | 31 */ 32 33#include "opt_compat.h" 34#include "opt_inet6.h" 35#include "opt_inet.h" 36#include "opt_mac.h" 37#include "opt_carp.h" 38 --- 2167 unchanged lines hidden (view full) --- 2206 return (ENAMETOOLONG); 2207 } 2208 2209 addrs = 0; 2210 TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { 2211 struct sockaddr *sa = ifa->ifa_addr; 2212 2213 if (jailed(curthread->td_ucred) && |
2214 prison_if(curthread->td_ucred, sa)) | 2214 !prison_if(curthread->td_ucred, sa)) |
2215 continue; 2216 addrs++; 2217#ifdef COMPAT_43 2218 if (cmd == OSIOCGIFCONF) { 2219 struct osockaddr *osa = 2220 (struct osockaddr *)&ifr.ifr_addr; 2221 ifr.ifr_addr = *sa; 2222 osa->sa_family = sa->sa_family; --- 656 unchanged lines hidden --- | 2215 continue; 2216 addrs++; 2217#ifdef COMPAT_43 2218 if (cmd == OSIOCGIFCONF) { 2219 struct osockaddr *osa = 2220 (struct osockaddr *)&ifr.ifr_addr; 2221 ifr.ifr_addr = *sa; 2222 osa->sa_family = sa->sa_family; --- 656 unchanged lines hidden --- |