diff options
author | David S. Miller <davem@davemloft.net> | 2010-05-12 03:05:35 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-12 03:05:35 -0400 |
commit | 278554bd6579206921f5d8a523649a7a57f8850d (patch) | |
tree | 4e6c527daf0910e455b3aa72e2c96b0479e430be /net/ipv6 | |
parent | 5a147e8bf982f9dd414c1dd751fe02c1942506b2 (diff) | |
parent | cea0d767c29669bf89f86e4aee46ef462d2ebae8 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
Documentation/feature-removal-schedule.txt
drivers/net/wireless/ath/ar9170/usb.c
drivers/scsi/iscsi_tcp.c
net/ipv4/ipmr.c
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/af_inet6.c | 2 | ||||
-rw-r--r-- | net/ipv6/datagram.c | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index d2df3144429b..e733942dafe1 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
@@ -200,7 +200,7 @@ lookup_protocol: | |||
200 | 200 | ||
201 | inet_sk(sk)->pinet6 = np = inet6_sk_generic(sk); | 201 | inet_sk(sk)->pinet6 = np = inet6_sk_generic(sk); |
202 | np->hop_limit = -1; | 202 | np->hop_limit = -1; |
203 | np->mcast_hops = -1; | 203 | np->mcast_hops = IPV6_DEFAULT_MCASTHOPS; |
204 | np->mc_loop = 1; | 204 | np->mc_loop = 1; |
205 | np->pmtudisc = IPV6_PMTUDISC_WANT; | 205 | np->pmtudisc = IPV6_PMTUDISC_WANT; |
206 | np->ipv6only = net->ipv6.sysctl.bindv6only; | 206 | np->ipv6only = net->ipv6.sysctl.bindv6only; |
diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c index 5959230bc6c1..712684687c9a 100644 --- a/net/ipv6/datagram.c +++ b/net/ipv6/datagram.c | |||
@@ -222,6 +222,8 @@ void ipv6_icmp_error(struct sock *sk, struct sk_buff *skb, int err, | |||
222 | if (!skb) | 222 | if (!skb) |
223 | return; | 223 | return; |
224 | 224 | ||
225 | skb->protocol = htons(ETH_P_IPV6); | ||
226 | |||
225 | serr = SKB_EXT_ERR(skb); | 227 | serr = SKB_EXT_ERR(skb); |
226 | serr->ee.ee_errno = err; | 228 | serr->ee.ee_errno = err; |
227 | serr->ee.ee_origin = SO_EE_ORIGIN_ICMP6; | 229 | serr->ee.ee_origin = SO_EE_ORIGIN_ICMP6; |
@@ -255,6 +257,8 @@ void ipv6_local_error(struct sock *sk, int err, struct flowi *fl, u32 info) | |||
255 | if (!skb) | 257 | if (!skb) |
256 | return; | 258 | return; |
257 | 259 | ||
260 | skb->protocol = htons(ETH_P_IPV6); | ||
261 | |||
258 | skb_put(skb, sizeof(struct ipv6hdr)); | 262 | skb_put(skb, sizeof(struct ipv6hdr)); |
259 | skb_reset_network_header(skb); | 263 | skb_reset_network_header(skb); |
260 | iph = ipv6_hdr(skb); | 264 | iph = ipv6_hdr(skb); |
@@ -358,7 +362,7 @@ int ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len) | |||
358 | sin->sin6_flowinfo = 0; | 362 | sin->sin6_flowinfo = 0; |
359 | sin->sin6_port = serr->port; | 363 | sin->sin6_port = serr->port; |
360 | sin->sin6_scope_id = 0; | 364 | sin->sin6_scope_id = 0; |
361 | if (serr->ee.ee_origin == SO_EE_ORIGIN_ICMP6) { | 365 | if (skb->protocol == htons(ETH_P_IPV6)) { |
362 | ipv6_addr_copy(&sin->sin6_addr, | 366 | ipv6_addr_copy(&sin->sin6_addr, |
363 | (struct in6_addr *)(nh + serr->addr_offset)); | 367 | (struct in6_addr *)(nh + serr->addr_offset)); |
364 | if (np->sndflow) | 368 | if (np->sndflow) |
@@ -380,7 +384,7 @@ int ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len) | |||
380 | sin->sin6_family = AF_INET6; | 384 | sin->sin6_family = AF_INET6; |
381 | sin->sin6_flowinfo = 0; | 385 | sin->sin6_flowinfo = 0; |
382 | sin->sin6_scope_id = 0; | 386 | sin->sin6_scope_id = 0; |
383 | if (serr->ee.ee_origin == SO_EE_ORIGIN_ICMP6) { | 387 | if (skb->protocol == htons(ETH_P_IPV6)) { |
384 | ipv6_addr_copy(&sin->sin6_addr, &ipv6_hdr(skb)->saddr); | 388 | ipv6_addr_copy(&sin->sin6_addr, &ipv6_hdr(skb)->saddr); |
385 | if (np->rxopt.all) | 389 | if (np->rxopt.all) |
386 | datagram_recv_ctl(sk, msg, skb); | 390 | datagram_recv_ctl(sk, msg, skb); |