diff options
author | David Brown <davidb@codeaurora.org> | 2011-03-17 01:13:16 -0400 |
---|---|---|
committer | David Brown <davidb@codeaurora.org> | 2011-03-17 01:13:16 -0400 |
commit | 92c260f755c42337c550d8ac1f8ccd1b32bffb20 (patch) | |
tree | 6d04fefc1adeecabfb2b00c201e0db78fa2b5529 /net/ipv6/route.c | |
parent | 8e76a80960bf06c245160a484d5a363ca6b520bb (diff) | |
parent | 05e34754518b6a90d5c392790c032575fab12d66 (diff) |
Merge remote branch 'rmk/for-linus' into for-linus
* rmk/for-linus: (1557 commits)
ARM: 6806/1: irq: introduce entry and exit functions for chained handlers
ARM: 6781/1: Thumb-2: Work around buggy Thumb-2 short branch relocations in gas
ARM: 6747/1: P2V: Thumb2 support
ARM: 6798/1: aout-core: zero thread debug registers in a.out core dump
ARM: 6796/1: Footbridge: Fix I/O mappings for NOMMU mode
ARM: 6784/1: errata: no automatic Store Buffer drain on Cortex-A9
ARM: 6772/1: errata: possible fault MMU translations following an ASID switch
ARM: 6776/1: mach-ux500: activate fix for errata 753970
ARM: 6794/1: SPEAr: Append UL to device address macros.
ARM: 6793/1: SPEAr: Remove unused *_SIZE macros from spear*.h files
ARM: 6792/1: SPEAr: Replace SIZE macro's with SZ_4K macros
ARM: 6791/1: SPEAr3xx: Declare device structures after shirq code
ARM: 6790/1: SPEAr: Clock Framework: Rename usbd clock and align apb_clk entry
ARM: 6789/1: SPEAr3xx: Rename sdio to sdhci
ARM: 6788/1: SPEAr: Include mach/hardware.h instead of mach/spear.h
ARM: 6787/1: SPEAr: Reorder #includes in .h & .c files.
ARM: 6681/1: SPEAr: add debugfs support to clk API
ARM: 6703/1: SPEAr: update clk API support
ARM: 6679/1: SPEAr: make clk API functions more generic
ARM: 6737/1: SPEAr: formalized timer support
...
Conflicts:
arch/arm/mach-msm/board-msm7x27.c
arch/arm/mach-msm/board-msm7x30.c
arch/arm/mach-msm/board-qsd8x50.c
arch/arm/mach-msm/board-sapphire.c
arch/arm/mach-msm/include/mach/memory.h
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r-- | net/ipv6/route.c | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 373bd0416f69..904312e25a3c 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -72,8 +72,6 @@ | |||
72 | #define RT6_TRACE(x...) do { ; } while (0) | 72 | #define RT6_TRACE(x...) do { ; } while (0) |
73 | #endif | 73 | #endif |
74 | 74 | ||
75 | #define CLONE_OFFLINK_ROUTE 0 | ||
76 | |||
77 | static struct rt6_info * ip6_rt_copy(struct rt6_info *ort); | 75 | static struct rt6_info * ip6_rt_copy(struct rt6_info *ort); |
78 | static struct dst_entry *ip6_dst_check(struct dst_entry *dst, u32 cookie); | 76 | static struct dst_entry *ip6_dst_check(struct dst_entry *dst, u32 cookie); |
79 | static unsigned int ip6_default_advmss(const struct dst_entry *dst); | 77 | static unsigned int ip6_default_advmss(const struct dst_entry *dst); |
@@ -115,6 +113,11 @@ static struct dst_ops ip6_dst_ops_template = { | |||
115 | .local_out = __ip6_local_out, | 113 | .local_out = __ip6_local_out, |
116 | }; | 114 | }; |
117 | 115 | ||
116 | static unsigned int ip6_blackhole_default_mtu(const struct dst_entry *dst) | ||
117 | { | ||
118 | return 0; | ||
119 | } | ||
120 | |||
118 | static void ip6_rt_blackhole_update_pmtu(struct dst_entry *dst, u32 mtu) | 121 | static void ip6_rt_blackhole_update_pmtu(struct dst_entry *dst, u32 mtu) |
119 | { | 122 | { |
120 | } | 123 | } |
@@ -124,6 +127,8 @@ static struct dst_ops ip6_dst_blackhole_ops = { | |||
124 | .protocol = cpu_to_be16(ETH_P_IPV6), | 127 | .protocol = cpu_to_be16(ETH_P_IPV6), |
125 | .destroy = ip6_dst_destroy, | 128 | .destroy = ip6_dst_destroy, |
126 | .check = ip6_dst_check, | 129 | .check = ip6_dst_check, |
130 | .default_mtu = ip6_blackhole_default_mtu, | ||
131 | .default_advmss = ip6_default_advmss, | ||
127 | .update_pmtu = ip6_rt_blackhole_update_pmtu, | 132 | .update_pmtu = ip6_rt_blackhole_update_pmtu, |
128 | }; | 133 | }; |
129 | 134 | ||
@@ -196,7 +201,6 @@ static void ip6_dst_destroy(struct dst_entry *dst) | |||
196 | in6_dev_put(idev); | 201 | in6_dev_put(idev); |
197 | } | 202 | } |
198 | if (peer) { | 203 | if (peer) { |
199 | BUG_ON(!(rt->rt6i_flags & RTF_CACHE)); | ||
200 | rt->rt6i_peer = NULL; | 204 | rt->rt6i_peer = NULL; |
201 | inet_putpeer(peer); | 205 | inet_putpeer(peer); |
202 | } | 206 | } |
@@ -206,9 +210,6 @@ void rt6_bind_peer(struct rt6_info *rt, int create) | |||
206 | { | 210 | { |
207 | struct inet_peer *peer; | 211 | struct inet_peer *peer; |
208 | 212 | ||
209 | if (WARN_ON(!(rt->rt6i_flags & RTF_CACHE))) | ||
210 | return; | ||
211 | |||
212 | peer = inet_getpeer_v6(&rt->rt6i_dst.addr, create); | 213 | peer = inet_getpeer_v6(&rt->rt6i_dst.addr, create); |
213 | if (peer && cmpxchg(&rt->rt6i_peer, NULL, peer) != NULL) | 214 | if (peer && cmpxchg(&rt->rt6i_peer, NULL, peer) != NULL) |
214 | inet_putpeer(peer); | 215 | inet_putpeer(peer); |
@@ -738,13 +739,8 @@ restart: | |||
738 | 739 | ||
739 | if (!rt->rt6i_nexthop && !(rt->rt6i_flags & RTF_NONEXTHOP)) | 740 | if (!rt->rt6i_nexthop && !(rt->rt6i_flags & RTF_NONEXTHOP)) |
740 | nrt = rt6_alloc_cow(rt, &fl->fl6_dst, &fl->fl6_src); | 741 | nrt = rt6_alloc_cow(rt, &fl->fl6_dst, &fl->fl6_src); |
741 | else { | 742 | else |
742 | #if CLONE_OFFLINK_ROUTE | ||
743 | nrt = rt6_alloc_clone(rt, &fl->fl6_dst); | 743 | nrt = rt6_alloc_clone(rt, &fl->fl6_dst); |
744 | #else | ||
745 | goto out2; | ||
746 | #endif | ||
747 | } | ||
748 | 744 | ||
749 | dst_release(&rt->dst); | 745 | dst_release(&rt->dst); |
750 | rt = nrt ? : net->ipv6.ip6_null_entry; | 746 | rt = nrt ? : net->ipv6.ip6_null_entry; |
@@ -2561,14 +2557,16 @@ static | |||
2561 | int ipv6_sysctl_rtcache_flush(ctl_table *ctl, int write, | 2557 | int ipv6_sysctl_rtcache_flush(ctl_table *ctl, int write, |
2562 | void __user *buffer, size_t *lenp, loff_t *ppos) | 2558 | void __user *buffer, size_t *lenp, loff_t *ppos) |
2563 | { | 2559 | { |
2564 | struct net *net = current->nsproxy->net_ns; | 2560 | struct net *net; |
2565 | int delay = net->ipv6.sysctl.flush_delay; | 2561 | int delay; |
2566 | if (write) { | 2562 | if (!write) |
2567 | proc_dointvec(ctl, write, buffer, lenp, ppos); | ||
2568 | fib6_run_gc(delay <= 0 ? ~0UL : (unsigned long)delay, net); | ||
2569 | return 0; | ||
2570 | } else | ||
2571 | return -EINVAL; | 2563 | return -EINVAL; |
2564 | |||
2565 | net = (struct net *)ctl->extra1; | ||
2566 | delay = net->ipv6.sysctl.flush_delay; | ||
2567 | proc_dointvec(ctl, write, buffer, lenp, ppos); | ||
2568 | fib6_run_gc(delay <= 0 ? ~0UL : (unsigned long)delay, net); | ||
2569 | return 0; | ||
2572 | } | 2570 | } |
2573 | 2571 | ||
2574 | ctl_table ipv6_route_table_template[] = { | 2572 | ctl_table ipv6_route_table_template[] = { |
@@ -2655,6 +2653,7 @@ struct ctl_table * __net_init ipv6_route_sysctl_init(struct net *net) | |||
2655 | 2653 | ||
2656 | if (table) { | 2654 | if (table) { |
2657 | table[0].data = &net->ipv6.sysctl.flush_delay; | 2655 | table[0].data = &net->ipv6.sysctl.flush_delay; |
2656 | table[0].extra1 = net; | ||
2658 | table[1].data = &net->ipv6.ip6_dst_ops.gc_thresh; | 2657 | table[1].data = &net->ipv6.ip6_dst_ops.gc_thresh; |
2659 | table[2].data = &net->ipv6.sysctl.ip6_rt_max_size; | 2658 | table[2].data = &net->ipv6.sysctl.ip6_rt_max_size; |
2660 | table[3].data = &net->ipv6.sysctl.ip6_rt_gc_min_interval; | 2659 | table[3].data = &net->ipv6.sysctl.ip6_rt_gc_min_interval; |