Deleted Added
full compact
in6_src.c (168191) in6_src.c (169154)
1/* $FreeBSD: head/sys/netinet6/in6_src.c 168191 2007-03-31 23:23:42Z jhb $ */
1/* $FreeBSD: head/sys/netinet6/in6_src.c 169154 2007-04-30 23:12:05Z rwatson $ */
2/* $KAME: in6_src.c,v 1.132 2003/08/26 04:42:27 keiichi 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

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

768 if ((so->so_options & (SO_REUSEADDR|SO_REUSEPORT)) == 0)
769 wild = INPLOOKUP_WILDCARD;
770
771 inp->inp_flags |= INP_ANONPORT;
772
773 if (inp->inp_flags & INP_HIGHPORT) {
774 first = ipport_hifirstauto; /* sysctl */
775 last = ipport_hilastauto;
2/* $KAME: in6_src.c,v 1.132 2003/08/26 04:42:27 keiichi 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

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

768 if ((so->so_options & (SO_REUSEADDR|SO_REUSEPORT)) == 0)
769 wild = INPLOOKUP_WILDCARD;
770
771 inp->inp_flags |= INP_ANONPORT;
772
773 if (inp->inp_flags & INP_HIGHPORT) {
774 first = ipport_hifirstauto; /* sysctl */
775 last = ipport_hilastauto;
776 lastport = &pcbinfo->lasthi;
776 lastport = &pcbinfo->ipi_lasthi;
777 } else if (inp->inp_flags & INP_LOWPORT) {
778 error = priv_check_cred(cred, PRIV_NETINET_RESERVEDPORT,
779 SUSER_ALLOWJAIL);
780 if (error)
781 return error;
782 first = ipport_lowfirstauto; /* 1023 */
783 last = ipport_lowlastauto; /* 600 */
777 } else if (inp->inp_flags & INP_LOWPORT) {
778 error = priv_check_cred(cred, PRIV_NETINET_RESERVEDPORT,
779 SUSER_ALLOWJAIL);
780 if (error)
781 return error;
782 first = ipport_lowfirstauto; /* 1023 */
783 last = ipport_lowlastauto; /* 600 */
784 lastport = &pcbinfo->lastlow;
784 lastport = &pcbinfo->ipi_lastlow;
785 } else {
786 first = ipport_firstauto; /* sysctl */
787 last = ipport_lastauto;
785 } else {
786 first = ipport_firstauto; /* sysctl */
787 last = ipport_lastauto;
788 lastport = &pcbinfo->lastport;
788 lastport = &pcbinfo->ipi_lastport;
789 }
790 /*
791 * Simple check to ensure all ports are not used up causing
792 * a deadlock here.
793 *
794 * We split the two cases (up and down) so that the direction
795 * is not being tested on each round of the loop.
796 */

--- 310 unchanged lines hidden ---
789 }
790 /*
791 * Simple check to ensure all ports are not used up causing
792 * a deadlock here.
793 *
794 * We split the two cases (up and down) so that the direction
795 * is not being tested on each round of the loop.
796 */

--- 310 unchanged lines hidden ---