diff options
author | David S. Miller <davem@davemloft.net> | 2011-11-26 14:47:03 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-26 14:47:03 -0500 |
commit | 6dec4ac4ee1ad894dc0e9647cd3e180f93fc353c (patch) | |
tree | cd71e597bbbe677820bb229c6aedbad412758959 /net/ipv6 | |
parent | d6f03f29f7cdf064289f941bf0b838348e996e65 (diff) | |
parent | fc0b927d9a5024e138c4318fe19a590f23e3eeec (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
net/ipv4/inet_diag.c
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/inet6_connection_sock.c | 2 | ||||
-rw-r--r-- | net/ipv6/ndisc.c | 2 | ||||
-rw-r--r-- | net/ipv6/netfilter/Kconfig | 1 | ||||
-rw-r--r-- | net/ipv6/route.c | 21 | ||||
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 13 |
5 files changed, 23 insertions, 16 deletions
diff --git a/net/ipv6/inet6_connection_sock.c b/net/ipv6/inet6_connection_sock.c index 4d7bfb321c75..02dd203d9eac 100644 --- a/net/ipv6/inet6_connection_sock.c +++ b/net/ipv6/inet6_connection_sock.c | |||
@@ -85,7 +85,7 @@ struct dst_entry *inet6_csk_route_req(struct sock *sk, | |||
85 | * request_sock (formerly open request) hash tables. | 85 | * request_sock (formerly open request) hash tables. |
86 | */ | 86 | */ |
87 | static u32 inet6_synq_hash(const struct in6_addr *raddr, const __be16 rport, | 87 | static u32 inet6_synq_hash(const struct in6_addr *raddr, const __be16 rport, |
88 | const u32 rnd, const u16 synq_hsize) | 88 | const u32 rnd, const u32 synq_hsize) |
89 | { | 89 | { |
90 | u32 c; | 90 | u32 c; |
91 | 91 | ||
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index a4769881c5b5..2854705b15ea 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
@@ -1574,7 +1574,7 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh, | |||
1574 | } | 1574 | } |
1575 | if (!rt->rt6i_peer) | 1575 | if (!rt->rt6i_peer) |
1576 | rt6_bind_peer(rt, 1); | 1576 | rt6_bind_peer(rt, 1); |
1577 | if (inet_peer_xrlim_allow(rt->rt6i_peer, 1*HZ)) | 1577 | if (!inet_peer_xrlim_allow(rt->rt6i_peer, 1*HZ)) |
1578 | goto release; | 1578 | goto release; |
1579 | 1579 | ||
1580 | if (dev->addr_len) { | 1580 | if (dev->addr_len) { |
diff --git a/net/ipv6/netfilter/Kconfig b/net/ipv6/netfilter/Kconfig index 448464844a25..f792b34cbe9c 100644 --- a/net/ipv6/netfilter/Kconfig +++ b/net/ipv6/netfilter/Kconfig | |||
@@ -186,7 +186,6 @@ config IP6_NF_MANGLE | |||
186 | 186 | ||
187 | config IP6_NF_RAW | 187 | config IP6_NF_RAW |
188 | tristate 'raw table support (required for TRACE)' | 188 | tristate 'raw table support (required for TRACE)' |
189 | depends on NETFILTER_ADVANCED | ||
190 | help | 189 | help |
191 | This option adds a `raw' table to ip6tables. This table is the very | 190 | This option adds a `raw' table to ip6tables. This table is the very |
192 | first in the netfilter framework and hooks in at the PREROUTING | 191 | first in the netfilter framework and hooks in at the PREROUTING |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 2897403fdaff..0e381bb94683 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -77,7 +77,7 @@ static struct rt6_info *ip6_rt_copy(const struct rt6_info *ort, | |||
77 | const struct in6_addr *dest); | 77 | const struct in6_addr *dest); |
78 | static struct dst_entry *ip6_dst_check(struct dst_entry *dst, u32 cookie); | 78 | 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); | 79 | static unsigned int ip6_default_advmss(const struct dst_entry *dst); |
80 | static unsigned int ip6_default_mtu(const struct dst_entry *dst); | 80 | static unsigned int ip6_mtu(const struct dst_entry *dst); |
81 | static struct dst_entry *ip6_negative_advice(struct dst_entry *); | 81 | static struct dst_entry *ip6_negative_advice(struct dst_entry *); |
82 | static void ip6_dst_destroy(struct dst_entry *); | 82 | static void ip6_dst_destroy(struct dst_entry *); |
83 | static void ip6_dst_ifdown(struct dst_entry *, | 83 | static void ip6_dst_ifdown(struct dst_entry *, |
@@ -144,7 +144,7 @@ static struct dst_ops ip6_dst_ops_template = { | |||
144 | .gc_thresh = 1024, | 144 | .gc_thresh = 1024, |
145 | .check = ip6_dst_check, | 145 | .check = ip6_dst_check, |
146 | .default_advmss = ip6_default_advmss, | 146 | .default_advmss = ip6_default_advmss, |
147 | .default_mtu = ip6_default_mtu, | 147 | .mtu = ip6_mtu, |
148 | .cow_metrics = ipv6_cow_metrics, | 148 | .cow_metrics = ipv6_cow_metrics, |
149 | .destroy = ip6_dst_destroy, | 149 | .destroy = ip6_dst_destroy, |
150 | .ifdown = ip6_dst_ifdown, | 150 | .ifdown = ip6_dst_ifdown, |
@@ -155,9 +155,11 @@ static struct dst_ops ip6_dst_ops_template = { | |||
155 | .neigh_lookup = ip6_neigh_lookup, | 155 | .neigh_lookup = ip6_neigh_lookup, |
156 | }; | 156 | }; |
157 | 157 | ||
158 | static unsigned int ip6_blackhole_default_mtu(const struct dst_entry *dst) | 158 | static unsigned int ip6_blackhole_mtu(const struct dst_entry *dst) |
159 | { | 159 | { |
160 | return 0; | 160 | unsigned int mtu = dst_metric_raw(dst, RTAX_MTU); |
161 | |||
162 | return mtu ? : dst->dev->mtu; | ||
161 | } | 163 | } |
162 | 164 | ||
163 | static void ip6_rt_blackhole_update_pmtu(struct dst_entry *dst, u32 mtu) | 165 | static void ip6_rt_blackhole_update_pmtu(struct dst_entry *dst, u32 mtu) |
@@ -175,7 +177,7 @@ static struct dst_ops ip6_dst_blackhole_ops = { | |||
175 | .protocol = cpu_to_be16(ETH_P_IPV6), | 177 | .protocol = cpu_to_be16(ETH_P_IPV6), |
176 | .destroy = ip6_dst_destroy, | 178 | .destroy = ip6_dst_destroy, |
177 | .check = ip6_dst_check, | 179 | .check = ip6_dst_check, |
178 | .default_mtu = ip6_blackhole_default_mtu, | 180 | .mtu = ip6_blackhole_mtu, |
179 | .default_advmss = ip6_default_advmss, | 181 | .default_advmss = ip6_default_advmss, |
180 | .update_pmtu = ip6_rt_blackhole_update_pmtu, | 182 | .update_pmtu = ip6_rt_blackhole_update_pmtu, |
181 | .cow_metrics = ip6_rt_blackhole_cow_metrics, | 183 | .cow_metrics = ip6_rt_blackhole_cow_metrics, |
@@ -1041,10 +1043,15 @@ static unsigned int ip6_default_advmss(const struct dst_entry *dst) | |||
1041 | return mtu; | 1043 | return mtu; |
1042 | } | 1044 | } |
1043 | 1045 | ||
1044 | static unsigned int ip6_default_mtu(const struct dst_entry *dst) | 1046 | static unsigned int ip6_mtu(const struct dst_entry *dst) |
1045 | { | 1047 | { |
1046 | unsigned int mtu = IPV6_MIN_MTU; | ||
1047 | struct inet6_dev *idev; | 1048 | struct inet6_dev *idev; |
1049 | unsigned int mtu = dst_metric_raw(dst, RTAX_MTU); | ||
1050 | |||
1051 | if (mtu) | ||
1052 | return mtu; | ||
1053 | |||
1054 | mtu = IPV6_MIN_MTU; | ||
1048 | 1055 | ||
1049 | rcu_read_lock(); | 1056 | rcu_read_lock(); |
1050 | idev = __in6_dev_get(dst->dev); | 1057 | idev = __in6_dev_get(dst->dev); |
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index fd98dd010fcb..9d74eee334d6 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -1253,6 +1253,13 @@ static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb) | |||
1253 | if (!want_cookie || tmp_opt.tstamp_ok) | 1253 | if (!want_cookie || tmp_opt.tstamp_ok) |
1254 | TCP_ECN_create_request(req, tcp_hdr(skb)); | 1254 | TCP_ECN_create_request(req, tcp_hdr(skb)); |
1255 | 1255 | ||
1256 | treq->iif = sk->sk_bound_dev_if; | ||
1257 | |||
1258 | /* So that link locals have meaning */ | ||
1259 | if (!sk->sk_bound_dev_if && | ||
1260 | ipv6_addr_type(&treq->rmt_addr) & IPV6_ADDR_LINKLOCAL) | ||
1261 | treq->iif = inet6_iif(skb); | ||
1262 | |||
1256 | if (!isn) { | 1263 | if (!isn) { |
1257 | struct inet_peer *peer = NULL; | 1264 | struct inet_peer *peer = NULL; |
1258 | 1265 | ||
@@ -1262,12 +1269,6 @@ static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb) | |||
1262 | atomic_inc(&skb->users); | 1269 | atomic_inc(&skb->users); |
1263 | treq->pktopts = skb; | 1270 | treq->pktopts = skb; |
1264 | } | 1271 | } |
1265 | treq->iif = sk->sk_bound_dev_if; | ||
1266 | |||
1267 | /* So that link locals have meaning */ | ||
1268 | if (!sk->sk_bound_dev_if && | ||
1269 | ipv6_addr_type(&treq->rmt_addr) & IPV6_ADDR_LINKLOCAL) | ||
1270 | treq->iif = inet6_iif(skb); | ||
1271 | 1272 | ||
1272 | if (want_cookie) { | 1273 | if (want_cookie) { |
1273 | isn = cookie_v6_init_sequence(sk, skb, &req->mss); | 1274 | isn = cookie_v6_init_sequence(sk, skb, &req->mss); |