in_pcb.c (83366) | in_pcb.c (83934) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1991, 1993, 1995 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 --- 17 unchanged lines hidden (view full) --- 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 * @(#)in_pcb.c 8.4 (Berkeley) 5/24/95 | 1/* 2 * Copyright (c) 1982, 1986, 1991, 1993, 1995 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 --- 17 unchanged lines hidden (view full) --- 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 * @(#)in_pcb.c 8.4 (Berkeley) 5/24/95 |
34 * $FreeBSD: head/sys/netinet/in_pcb.c 83366 2001-09-12 08:38:13Z julian $ | 34 * $FreeBSD: head/sys/netinet/in_pcb.c 83934 2001-09-25 18:40:52Z brooks $ |
35 */ 36 37#include "opt_ipsec.h" 38#include "opt_inet6.h" 39 40#include <sys/param.h> 41#include <sys/systm.h> 42#include <sys/malloc.h> --- 19 unchanged lines hidden (view full) --- 62#include <netinet/in_pcb.h> 63#include <netinet/in_var.h> 64#include <netinet/ip_var.h> 65#ifdef INET6 66#include <netinet/ip6.h> 67#include <netinet6/ip6_var.h> 68#endif /* INET6 */ 69 | 35 */ 36 37#include "opt_ipsec.h" 38#include "opt_inet6.h" 39 40#include <sys/param.h> 41#include <sys/systm.h> 42#include <sys/malloc.h> --- 19 unchanged lines hidden (view full) --- 62#include <netinet/in_pcb.h> 63#include <netinet/in_var.h> 64#include <netinet/ip_var.h> 65#ifdef INET6 66#include <netinet/ip6.h> 67#include <netinet6/ip6_var.h> 68#endif /* INET6 */ 69 |
70#include "faith.h" 71 | |
72#ifdef IPSEC 73#include <netinet6/ipsec.h> 74#include <netkey/key.h> 75#endif /* IPSEC */ 76 77struct in_addr zeroin_addr; 78 79/* --- 834 unchanged lines hidden (view full) --- 914 head = &pcbinfo->hashbase[INP_PCBHASH(INADDR_ANY, lport, 0, pcbinfo->hashmask)]; 915 LIST_FOREACH(inp, head, inp_hash) { 916#ifdef INET6 917 if ((inp->inp_vflag & INP_IPV4) == 0) 918 continue; 919#endif 920 if (inp->inp_faddr.s_addr == INADDR_ANY && 921 inp->inp_lport == lport) { | 70#ifdef IPSEC 71#include <netinet6/ipsec.h> 72#include <netkey/key.h> 73#endif /* IPSEC */ 74 75struct in_addr zeroin_addr; 76 77/* --- 834 unchanged lines hidden (view full) --- 912 head = &pcbinfo->hashbase[INP_PCBHASH(INADDR_ANY, lport, 0, pcbinfo->hashmask)]; 913 LIST_FOREACH(inp, head, inp_hash) { 914#ifdef INET6 915 if ((inp->inp_vflag & INP_IPV4) == 0) 916 continue; 917#endif 918 if (inp->inp_faddr.s_addr == INADDR_ANY && 919 inp->inp_lport == lport) { |
922#if defined(NFAITH) && NFAITH > 0 | |
923 if (ifp && ifp->if_type == IFT_FAITH && 924 (inp->inp_flags & INP_FAITH) == 0) 925 continue; | 920 if (ifp && ifp->if_type == IFT_FAITH && 921 (inp->inp_flags & INP_FAITH) == 0) 922 continue; |
926#endif | |
927 if (inp->inp_laddr.s_addr == laddr.s_addr) 928 return (inp); 929 else if (inp->inp_laddr.s_addr == INADDR_ANY) { 930#if defined(INET6) 931 if (INP_CHECK_SOCKAF(inp->inp_socket, 932 AF_INET6)) 933 local_wild_mapped = inp; 934 else --- 127 unchanged lines hidden --- | 923 if (inp->inp_laddr.s_addr == laddr.s_addr) 924 return (inp); 925 else if (inp->inp_laddr.s_addr == INADDR_ANY) { 926#if defined(INET6) 927 if (INP_CHECK_SOCKAF(inp->inp_socket, 928 AF_INET6)) 929 local_wild_mapped = inp; 930 else --- 127 unchanged lines hidden --- |