Deleted Added
full compact
in6_src.c (175512) in6_src.c (178167)
1/*-
2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
3 * 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

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

56 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
57 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
58 * SUCH DAMAGE.
59 *
60 * @(#)in_pcb.c 8.2 (Berkeley) 1/4/94
61 */
62
63#include <sys/cdefs.h>
1/*-
2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
3 * 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

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

56 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
57 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
58 * SUCH DAMAGE.
59 *
60 * @(#)in_pcb.c 8.2 (Berkeley) 1/4/94
61 */
62
63#include <sys/cdefs.h>
64__FBSDID("$FreeBSD: head/sys/netinet6/in6_src.c 175512 2008-01-20 10:08:15Z bz $");
64__FBSDID("$FreeBSD: head/sys/netinet6/in6_src.c 178167 2008-04-13 05:45:14Z qingli $");
65
66#include "opt_inet.h"
67#include "opt_inet6.h"
65
66#include "opt_inet.h"
67#include "opt_inet6.h"
68#include "opt_mpath.h"
68
69#include <sys/param.h>
70#include <sys/systm.h>
71#include <sys/lock.h>
72#include <sys/malloc.h>
73#include <sys/mbuf.h>
74#include <sys/priv.h>
75#include <sys/protosw.h>
76#include <sys/socket.h>
77#include <sys/socketvar.h>
78#include <sys/sockio.h>
79#include <sys/sysctl.h>
80#include <sys/errno.h>
81#include <sys/time.h>
82#include <sys/kernel.h>
83#include <sys/sx.h>
84
85#include <net/if.h>
86#include <net/route.h>
69
70#include <sys/param.h>
71#include <sys/systm.h>
72#include <sys/lock.h>
73#include <sys/malloc.h>
74#include <sys/mbuf.h>
75#include <sys/priv.h>
76#include <sys/protosw.h>
77#include <sys/socket.h>
78#include <sys/socketvar.h>
79#include <sys/sockio.h>
80#include <sys/sysctl.h>
81#include <sys/errno.h>
82#include <sys/time.h>
83#include <sys/kernel.h>
84#include <sys/sx.h>
85
86#include <net/if.h>
87#include <net/route.h>
88#ifdef RADIX_MPATH
89#include <net/radix_mpath.h>
90#endif
87
88#include <netinet/in.h>
89#include <netinet/in_var.h>
90#include <netinet/in_systm.h>
91#include <netinet/ip.h>
92#include <netinet/in_pcb.h>
93#include <netinet6/in6_var.h>
94#include <netinet/ip6.h>

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

563
564 /* No route yet, so try to acquire one */
565 bzero(&ro->ro_dst, sizeof(struct sockaddr_in6));
566 sa6 = (struct sockaddr_in6 *)&ro->ro_dst;
567 *sa6 = *dstsock;
568 sa6->sin6_scope_id = 0;
569
570 if (clone) {
91
92#include <netinet/in.h>
93#include <netinet/in_var.h>
94#include <netinet/in_systm.h>
95#include <netinet/ip.h>
96#include <netinet/in_pcb.h>
97#include <netinet6/in6_var.h>
98#include <netinet/ip6.h>

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

567
568 /* No route yet, so try to acquire one */
569 bzero(&ro->ro_dst, sizeof(struct sockaddr_in6));
570 sa6 = (struct sockaddr_in6 *)&ro->ro_dst;
571 *sa6 = *dstsock;
572 sa6->sin6_scope_id = 0;
573
574 if (clone) {
575#ifdef RADIX_MPATH
576 rtalloc_mpath((struct route *)ro,
577 ntohl(sa6->sin6_addr.s6_addr32[3]));
578#else
571 rtalloc((struct route *)ro);
579 rtalloc((struct route *)ro);
580#endif
572 } else {
573 ro->ro_rt = rtalloc1(&((struct route *)ro)
574 ->ro_dst, 0, 0UL);
575 if (ro->ro_rt)
576 RT_UNLOCK(ro->ro_rt);
577 }
578 }
579

--- 510 unchanged lines hidden ---
581 } else {
582 ro->ro_rt = rtalloc1(&((struct route *)ro)
583 ->ro_dst, 0, 0UL);
584 if (ro->ro_rt)
585 RT_UNLOCK(ro->ro_rt);
586 }
587 }
588

--- 510 unchanged lines hidden ---