Deleted Added
full compact
sctp_asconf.c (165647) sctp_asconf.c (166023)
1/*-
2 * Copyright (c) 2001-2006, Cisco Systems, Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met:
6 *
7 * a) Redistributions of source code must retain the above copyright notice,
8 * this list of conditions and the following disclaimer.

--- 17 unchanged lines hidden (view full) ---

26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
28 * THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31/* $KAME: sctp_asconf.c,v 1.24 2005/03/06 16:04:16 itojun Exp $ */
32
33#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2001-2006, Cisco Systems, Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met:
6 *
7 * a) Redistributions of source code must retain the above copyright notice,
8 * this list of conditions and the following disclaimer.

--- 17 unchanged lines hidden (view full) ---

26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
28 * THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31/* $KAME: sctp_asconf.c,v 1.24 2005/03/06 16:04:16 itojun Exp $ */
32
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/sys/netinet/sctp_asconf.c 165647 2006-12-29 20:21:42Z rrs $");
34__FBSDID("$FreeBSD: head/sys/netinet/sctp_asconf.c 166023 2007-01-15 15:12:10Z rrs $");
35
36
37
38#include "opt_ipsec.h"
39#include "opt_compat.h"
40#include "opt_inet6.h"
41#include "opt_inet.h"
42

--- 1738 unchanged lines hidden (view full) ---

1781 }
1782 } else if (ifa->ifa_addr->sa_family == AF_INET) {
1783 struct sockaddr_in *sin;
1784 struct in6pcb *inp6;
1785
1786 inp6 = (struct in6pcb *)&inp->ip_inp.inp;
1787 /* invalid if we are a v6 only endpoint */
1788 if ((inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) &&
35
36
37
38#include "opt_ipsec.h"
39#include "opt_compat.h"
40#include "opt_inet6.h"
41#include "opt_inet.h"
42

--- 1738 unchanged lines hidden (view full) ---

1781 }
1782 } else if (ifa->ifa_addr->sa_family == AF_INET) {
1783 struct sockaddr_in *sin;
1784 struct in6pcb *inp6;
1785
1786 inp6 = (struct in6pcb *)&inp->ip_inp.inp;
1787 /* invalid if we are a v6 only endpoint */
1788 if ((inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) &&
1789 (inp6->inp_flags & IN6P_IPV6_V6ONLY)
1790 )
1789 SCTP_IPV6_V6ONLY(inp6))
1791 return;
1792
1793 sin = (struct sockaddr_in *)ifa->ifa_addr;
1794 if (sin->sin_addr.s_addr == 0) {
1795 /* we skip unspecifed addresses */
1796 return;
1797 }
1798 if (stcb->asoc.ipv4_local_scope == 0 &&

--- 73 unchanged lines hidden (view full) ---

1872 }
1873 } else if (ifa->ifa_addr->sa_family == AF_INET) {
1874 /* invalid if we are a v6 only endpoint */
1875 struct in6pcb *inp6;
1876
1877 inp6 = (struct in6pcb *)&inp->ip_inp.inp;
1878
1879 if ((inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) &&
1790 return;
1791
1792 sin = (struct sockaddr_in *)ifa->ifa_addr;
1793 if (sin->sin_addr.s_addr == 0) {
1794 /* we skip unspecifed addresses */
1795 return;
1796 }
1797 if (stcb->asoc.ipv4_local_scope == 0 &&

--- 73 unchanged lines hidden (view full) ---

1871 }
1872 } else if (ifa->ifa_addr->sa_family == AF_INET) {
1873 /* invalid if we are a v6 only endpoint */
1874 struct in6pcb *inp6;
1875
1876 inp6 = (struct in6pcb *)&inp->ip_inp.inp;
1877
1878 if ((inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) &&
1880 (inp6->inp_flags & IN6P_IPV6_V6ONLY)
1881 ) {
1879 SCTP_IPV6_V6ONLY(inp6)) {
1882 SCTP_INP_WUNLOCK(inp);
1883 return;
1884 }
1885 } else {
1886 /* invalid address family */
1887 SCTP_INP_WUNLOCK(inp);
1888 return;
1889 }

--- 967 unchanged lines hidden ---
1880 SCTP_INP_WUNLOCK(inp);
1881 return;
1882 }
1883 } else {
1884 /* invalid address family */
1885 SCTP_INP_WUNLOCK(inp);
1886 return;
1887 }

--- 967 unchanged lines hidden ---