raw_ip.c (165634) | raw_ip.c (165648) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 1988, 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 * @(#)raw_ip.c 8.7 (Berkeley) 5/15/95 | 1/*- 2 * Copyright (c) 1982, 1986, 1988, 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 * @(#)raw_ip.c 8.7 (Berkeley) 5/15/95 |
30 * $FreeBSD: head/sys/netinet/raw_ip.c 165634 2006-12-29 14:58:18Z jhb $ | 30 * $FreeBSD: head/sys/netinet/raw_ip.c 165648 2006-12-29 21:59:17Z piso $ |
31 */ 32 33#include "opt_inet6.h" 34#include "opt_ipsec.h" 35#include "opt_mac.h" 36 37#include <sys/param.h> 38#include <sys/jail.h> --- 345 unchanged lines hidden (view full) --- 384 optval = inp->inp_flags & INP_HDRINCL; 385 error = sooptcopyout(sopt, &optval, sizeof optval); 386 break; 387 388 case IP_FW_ADD: /* ADD actually returns the body... */ 389 case IP_FW_GET: 390 case IP_FW_TABLE_GETSIZE: 391 case IP_FW_TABLE_LIST: | 31 */ 32 33#include "opt_inet6.h" 34#include "opt_ipsec.h" 35#include "opt_mac.h" 36 37#include <sys/param.h> 38#include <sys/jail.h> --- 345 unchanged lines hidden (view full) --- 384 optval = inp->inp_flags & INP_HDRINCL; 385 error = sooptcopyout(sopt, &optval, sizeof optval); 386 break; 387 388 case IP_FW_ADD: /* ADD actually returns the body... */ 389 case IP_FW_GET: 390 case IP_FW_TABLE_GETSIZE: 391 case IP_FW_TABLE_LIST: |
392 case IP_FW_NAT_GET_CONFIG: 393 case IP_FW_NAT_GET_LOG: |
|
392 /* 393 * XXXRW: Isn't this checked one layer down? Yes, it 394 * is. 395 */ 396 error = priv_check(curthread, PRIV_NETINET_IPFW); 397 if (error != 0) 398 return (error); 399 if (ip_fw_ctl_ptr != NULL) --- 53 unchanged lines hidden (view full) --- 453 case IP_FW_ADD: 454 case IP_FW_DEL: 455 case IP_FW_FLUSH: 456 case IP_FW_ZERO: 457 case IP_FW_RESETLOG: 458 case IP_FW_TABLE_ADD: 459 case IP_FW_TABLE_DEL: 460 case IP_FW_TABLE_FLUSH: | 394 /* 395 * XXXRW: Isn't this checked one layer down? Yes, it 396 * is. 397 */ 398 error = priv_check(curthread, PRIV_NETINET_IPFW); 399 if (error != 0) 400 return (error); 401 if (ip_fw_ctl_ptr != NULL) --- 53 unchanged lines hidden (view full) --- 455 case IP_FW_ADD: 456 case IP_FW_DEL: 457 case IP_FW_FLUSH: 458 case IP_FW_ZERO: 459 case IP_FW_RESETLOG: 460 case IP_FW_TABLE_ADD: 461 case IP_FW_TABLE_DEL: 462 case IP_FW_TABLE_FLUSH: |
463 case IP_FW_NAT_CFG: 464 case IP_FW_NAT_DEL: |
|
461 /* 462 * XXXRW: Isn't this checked one layer down? 463 */ 464 error = priv_check(curthread, PRIV_NETINET_IPFW); 465 if (error != 0) 466 return (error); 467 if (ip_fw_ctl_ptr != NULL) 468 error = ip_fw_ctl_ptr(sopt); --- 482 unchanged lines hidden --- | 465 /* 466 * XXXRW: Isn't this checked one layer down? 467 */ 468 error = priv_check(curthread, PRIV_NETINET_IPFW); 469 if (error != 0) 470 return (error); 471 if (ip_fw_ctl_ptr != NULL) 472 error = ip_fw_ctl_ptr(sopt); --- 482 unchanged lines hidden --- |