ip_divert.c (106152) | ip_divert.c (109623) |
---|---|
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 --- 16 unchanged lines hidden (view full) --- 25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * | 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 --- 16 unchanged lines hidden (view full) --- 25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * |
33 * $FreeBSD: head/sys/netinet/ip_divert.c 106152 2002-10-29 16:46:13Z fenner $ | 33 * $FreeBSD: head/sys/netinet/ip_divert.c 109623 2003-01-21 08:56:16Z alfred $ |
34 */ 35 36#include "opt_inet.h" 37#include "opt_ipfw.h" 38#include "opt_ipdivert.h" 39#include "opt_ipsec.h" 40#include "opt_mac.h" 41 --- 442 unchanged lines hidden (view full) --- 484 xig.xig_len = sizeof xig; 485 xig.xig_count = n; 486 xig.xig_gen = gencnt; 487 xig.xig_sogen = so_gencnt; 488 error = SYSCTL_OUT(req, &xig, sizeof xig); 489 if (error) 490 return error; 491 | 34 */ 35 36#include "opt_inet.h" 37#include "opt_ipfw.h" 38#include "opt_ipdivert.h" 39#include "opt_ipsec.h" 40#include "opt_mac.h" 41 --- 442 unchanged lines hidden (view full) --- 484 xig.xig_len = sizeof xig; 485 xig.xig_count = n; 486 xig.xig_gen = gencnt; 487 xig.xig_sogen = so_gencnt; 488 error = SYSCTL_OUT(req, &xig, sizeof xig); 489 if (error) 490 return error; 491 |
492 inp_list = malloc(n * sizeof *inp_list, M_TEMP, M_WAITOK); | 492 inp_list = malloc(n * sizeof *inp_list, M_TEMP, 0); |
493 if (inp_list == 0) 494 return ENOMEM; 495 496 s = splnet(); 497 for (inp = LIST_FIRST(divcbinfo.listhead), i = 0; inp && i < n; 498 inp = LIST_NEXT(inp, inp_list)) { 499 if (inp->inp_gencnt <= gencnt && !prison_xinpcb(req->td, inp)) 500 inp_list[i++] = inp; --- 68 unchanged lines hidden --- | 493 if (inp_list == 0) 494 return ENOMEM; 495 496 s = splnet(); 497 for (inp = LIST_FIRST(divcbinfo.listhead), i = 0; inp && i < n; 498 inp = LIST_NEXT(inp, inp_list)) { 499 if (inp->inp_gencnt <= gencnt && !prison_xinpcb(req->td, inp)) 500 inp_list[i++] = inp; --- 68 unchanged lines hidden --- |