Deleted Added
full compact
in6_src.c (186119) in6_src.c (186141)
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 186119 2008-12-15 06:10:57Z qingli $");
64__FBSDID("$FreeBSD: head/sys/netinet6/in6_src.c 186141 2008-12-15 21:50:54Z bz $");
65
66#include "opt_inet.h"
67#include "opt_inet6.h"
68#include "opt_mpath.h"
69
70#include <sys/param.h>
71#include <sys/systm.h>
72#include <sys/lock.h>

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

780/*
781 * Default hop limit selection. The precedence is as follows:
782 * 1. Hoplimit value specified via ioctl.
783 * 2. (If the outgoing interface is detected) the current
784 * hop limit of the interface specified by router advertisement.
785 * 3. The system default hoplimit.
786 */
787int
65
66#include "opt_inet.h"
67#include "opt_inet6.h"
68#include "opt_mpath.h"
69
70#include <sys/param.h>
71#include <sys/systm.h>
72#include <sys/lock.h>

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

780/*
781 * Default hop limit selection. The precedence is as follows:
782 * 1. Hoplimit value specified via ioctl.
783 * 2. (If the outgoing interface is detected) the current
784 * hop limit of the interface specified by router advertisement.
785 * 3. The system default hoplimit.
786 */
787int
788in6_selecthlim(struct in6pcb *in6p, struct ifnet *ifp)
788in6_selecthlim(struct inpcb *in6p, struct ifnet *ifp)
789{
790 INIT_VNET_INET6(curvnet);
791
792 if (in6p && in6p->in6p_hops >= 0)
793 return (in6p->in6p_hops);
794 else if (ifp)
795 return (ND_IFINFO(ifp)->chlim);
796 else if (in6p && !IN6_IS_ADDR_UNSPECIFIED(&in6p->in6p_faddr)) {

--- 383 unchanged lines hidden ---
789{
790 INIT_VNET_INET6(curvnet);
791
792 if (in6p && in6p->in6p_hops >= 0)
793 return (in6p->in6p_hops);
794 else if (ifp)
795 return (ND_IFINFO(ifp)->chlim);
796 else if (in6p && !IN6_IS_ADDR_UNSPECIFIED(&in6p->in6p_faddr)) {

--- 383 unchanged lines hidden ---