in6_pcb.c (133192) | in6_pcb.c (133720) |
---|---|
1/* $FreeBSD: head/sys/netinet6/in6_pcb.c 133192 2004-08-06 03:45:45Z rwatson $ */ | 1/* $FreeBSD: head/sys/netinet6/in6_pcb.c 133720 2004-08-14 15:32:40Z dwmalone $ */ |
2/* $KAME: in6_pcb.c,v 1.31 2001/05/21 05:45:10 jinmei Exp $ */ 3 4/* 5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions --- 50 unchanged lines hidden (view full) --- 60 * SUCH DAMAGE. 61 * 62 * @(#)in_pcb.c 8.2 (Berkeley) 1/4/94 63 */ 64 65#include "opt_inet.h" 66#include "opt_inet6.h" 67#include "opt_ipsec.h" | 2/* $KAME: in6_pcb.c,v 1.31 2001/05/21 05:45:10 jinmei Exp $ */ 3 4/* 5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions --- 50 unchanged lines hidden (view full) --- 60 * SUCH DAMAGE. 61 * 62 * @(#)in_pcb.c 8.2 (Berkeley) 1/4/94 63 */ 64 65#include "opt_inet.h" 66#include "opt_inet6.h" 67#include "opt_ipsec.h" |
68#include "opt_random_ip_id.h" | |
69 70#include <sys/param.h> 71#include <sys/systm.h> 72#include <sys/malloc.h> 73#include <sys/mbuf.h> 74#include <sys/domain.h> 75#include <sys/protosw.h> 76#include <sys/socket.h> --- 307 unchanged lines hidden (view full) --- 384 inp->in6p_laddr = *addr6; 385 } 386 inp->in6p_faddr = sin6->sin6_addr; 387 inp->inp_fport = sin6->sin6_port; 388 /* update flowinfo - draft-itojun-ipv6-flowlabel-api-00 */ 389 inp->in6p_flowinfo &= ~IPV6_FLOWLABEL_MASK; 390 if (inp->in6p_flags & IN6P_AUTOFLOWLABEL) 391 inp->in6p_flowinfo |= | 68 69#include <sys/param.h> 70#include <sys/systm.h> 71#include <sys/malloc.h> 72#include <sys/mbuf.h> 73#include <sys/domain.h> 74#include <sys/protosw.h> 75#include <sys/socket.h> --- 307 unchanged lines hidden (view full) --- 383 inp->in6p_laddr = *addr6; 384 } 385 inp->in6p_faddr = sin6->sin6_addr; 386 inp->inp_fport = sin6->sin6_port; 387 /* update flowinfo - draft-itojun-ipv6-flowlabel-api-00 */ 388 inp->in6p_flowinfo &= ~IPV6_FLOWLABEL_MASK; 389 if (inp->in6p_flags & IN6P_AUTOFLOWLABEL) 390 inp->in6p_flowinfo |= |
392#ifdef RANDOM_IP_ID | |
393 (htonl(ip6_randomflowlabel()) & IPV6_FLOWLABEL_MASK); | 391 (htonl(ip6_randomflowlabel()) & IPV6_FLOWLABEL_MASK); |
394#else 395 (htonl(ip6_flow_seq++) & IPV6_FLOWLABEL_MASK); 396#endif | |
397 398 in_pcbrehash(inp); 399#ifdef IPSEC 400 if (inp->inp_socket->so_type == SOCK_STREAM) 401 ipsec_pcbconn(inp->inp_sp); 402#endif 403 return (0); 404} --- 561 unchanged lines hidden --- | 392 393 in_pcbrehash(inp); 394#ifdef IPSEC 395 if (inp->inp_socket->so_type == SOCK_STREAM) 396 ipsec_pcbconn(inp->inp_sp); 397#endif 398 return (0); 399} --- 561 unchanged lines hidden --- |