diff options
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/datagram.c | 6 | ||||
-rw-r--r-- | net/ipv6/icmp.c | 2 | ||||
-rw-r--r-- | net/ipv6/inet6_hashtables.c | 2 | ||||
-rw-r--r-- | net/ipv6/ndisc.c | 2 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6t_eui64.c | 2 | ||||
-rw-r--r-- | net/ipv6/proc.c | 4 | ||||
-rw-r--r-- | net/ipv6/route.c | 11 |
7 files changed, 16 insertions, 13 deletions
diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c index 2ed689ac449e..5d4245ab4183 100644 --- a/net/ipv6/datagram.c +++ b/net/ipv6/datagram.c | |||
@@ -123,11 +123,11 @@ ipv4_connected: | |||
123 | goto out; | 123 | goto out; |
124 | } | 124 | } |
125 | sk->sk_bound_dev_if = usin->sin6_scope_id; | 125 | sk->sk_bound_dev_if = usin->sin6_scope_id; |
126 | if (!sk->sk_bound_dev_if && | ||
127 | (addr_type & IPV6_ADDR_MULTICAST)) | ||
128 | fl.oif = np->mcast_oif; | ||
129 | } | 126 | } |
130 | 127 | ||
128 | if (!sk->sk_bound_dev_if && (addr_type & IPV6_ADDR_MULTICAST)) | ||
129 | sk->sk_bound_dev_if = np->mcast_oif; | ||
130 | |||
131 | /* Connect to link-local address requires an interface */ | 131 | /* Connect to link-local address requires an interface */ |
132 | if (!sk->sk_bound_dev_if) { | 132 | if (!sk->sk_bound_dev_if) { |
133 | err = -EINVAL; | 133 | err = -EINVAL; |
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index 9bb031fa1c2f..f1240688dc58 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c | |||
@@ -458,8 +458,6 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info, | |||
458 | } | 458 | } |
459 | err = icmpv6_push_pending_frames(sk, &fl, &tmp_hdr, len + sizeof(struct icmp6hdr)); | 459 | err = icmpv6_push_pending_frames(sk, &fl, &tmp_hdr, len + sizeof(struct icmp6hdr)); |
460 | 460 | ||
461 | ICMP6_INC_STATS_BH(idev, ICMP6_MIB_OUTMSGS); | ||
462 | |||
463 | out_put: | 461 | out_put: |
464 | if (likely(idev != NULL)) | 462 | if (likely(idev != NULL)) |
465 | in6_dev_put(idev); | 463 | in6_dev_put(idev); |
diff --git a/net/ipv6/inet6_hashtables.c b/net/ipv6/inet6_hashtables.c index adc73adadfae..0765d8bd380f 100644 --- a/net/ipv6/inet6_hashtables.c +++ b/net/ipv6/inet6_hashtables.c | |||
@@ -193,7 +193,7 @@ static int __inet6_check_established(struct inet_timewait_death_row *death_row, | |||
193 | sk2->sk_family == PF_INET6 && | 193 | sk2->sk_family == PF_INET6 && |
194 | ipv6_addr_equal(&tw6->tw_v6_daddr, saddr) && | 194 | ipv6_addr_equal(&tw6->tw_v6_daddr, saddr) && |
195 | ipv6_addr_equal(&tw6->tw_v6_rcv_saddr, daddr) && | 195 | ipv6_addr_equal(&tw6->tw_v6_rcv_saddr, daddr) && |
196 | sk2->sk_bound_dev_if == sk->sk_bound_dev_if) { | 196 | (!sk2->sk_bound_dev_if || sk2->sk_bound_dev_if == dif)) { |
197 | if (twsk_unique(sk, sk2, twp)) | 197 | if (twsk_unique(sk, sk2, twp)) |
198 | goto unique; | 198 | goto unique; |
199 | else | 199 | else |
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index 67997a74ddce..777ed733b2d7 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
@@ -612,7 +612,7 @@ void ndisc_send_rs(struct net_device *dev, struct in6_addr *saddr, | |||
612 | * optimistic addresses, but we may send the solicitation | 612 | * optimistic addresses, but we may send the solicitation |
613 | * if we don't include the sllao. So here we check | 613 | * if we don't include the sllao. So here we check |
614 | * if our address is optimistic, and if so, we | 614 | * if our address is optimistic, and if so, we |
615 | * supress the inclusion of the sllao. | 615 | * suppress the inclusion of the sllao. |
616 | */ | 616 | */ |
617 | if (send_sllao) { | 617 | if (send_sllao) { |
618 | struct inet6_ifaddr *ifp = ipv6_get_ifaddr(saddr, dev, 1); | 618 | struct inet6_ifaddr *ifp = ipv6_get_ifaddr(saddr, dev, 1); |
diff --git a/net/ipv6/netfilter/ip6t_eui64.c b/net/ipv6/netfilter/ip6t_eui64.c index 34ba150bfe5d..41df9a578c7a 100644 --- a/net/ipv6/netfilter/ip6t_eui64.c +++ b/net/ipv6/netfilter/ip6t_eui64.c | |||
@@ -47,7 +47,7 @@ match(const struct sk_buff *skb, | |||
47 | memcpy(eui64 + 5, eth_hdr(skb)->h_source + 3, 3); | 47 | memcpy(eui64 + 5, eth_hdr(skb)->h_source + 3, 3); |
48 | eui64[3] = 0xff; | 48 | eui64[3] = 0xff; |
49 | eui64[4] = 0xfe; | 49 | eui64[4] = 0xfe; |
50 | eui64[0] |= 0x02; | 50 | eui64[0] ^= 0x02; |
51 | 51 | ||
52 | i = 0; | 52 | i = 0; |
53 | while (ipv6_hdr(skb)->saddr.s6_addr[8 + i] == eui64[i] | 53 | while (ipv6_hdr(skb)->saddr.s6_addr[8 + i] == eui64[i] |
diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c index 8631ed7fe8a9..44937616057e 100644 --- a/net/ipv6/proc.c +++ b/net/ipv6/proc.c | |||
@@ -88,7 +88,7 @@ static char *icmp6type2name[256] = { | |||
88 | [ICMPV6_PKT_TOOBIG] = "PktTooBigs", | 88 | [ICMPV6_PKT_TOOBIG] = "PktTooBigs", |
89 | [ICMPV6_TIME_EXCEED] = "TimeExcds", | 89 | [ICMPV6_TIME_EXCEED] = "TimeExcds", |
90 | [ICMPV6_PARAMPROB] = "ParmProblems", | 90 | [ICMPV6_PARAMPROB] = "ParmProblems", |
91 | [ICMPV6_ECHO_REQUEST] = "EchoRequest", | 91 | [ICMPV6_ECHO_REQUEST] = "Echos", |
92 | [ICMPV6_ECHO_REPLY] = "EchoReplies", | 92 | [ICMPV6_ECHO_REPLY] = "EchoReplies", |
93 | [ICMPV6_MGM_QUERY] = "GroupMembQueries", | 93 | [ICMPV6_MGM_QUERY] = "GroupMembQueries", |
94 | [ICMPV6_MGM_REPORT] = "GroupMembResponses", | 94 | [ICMPV6_MGM_REPORT] = "GroupMembResponses", |
@@ -98,7 +98,7 @@ static char *icmp6type2name[256] = { | |||
98 | [NDISC_ROUTER_SOLICITATION] = "RouterSolicits", | 98 | [NDISC_ROUTER_SOLICITATION] = "RouterSolicits", |
99 | [NDISC_NEIGHBOUR_ADVERTISEMENT] = "NeighborAdvertisements", | 99 | [NDISC_NEIGHBOUR_ADVERTISEMENT] = "NeighborAdvertisements", |
100 | [NDISC_NEIGHBOUR_SOLICITATION] = "NeighborSolicits", | 100 | [NDISC_NEIGHBOUR_SOLICITATION] = "NeighborSolicits", |
101 | [NDISC_REDIRECT] = "NeighborRedirects", | 101 | [NDISC_REDIRECT] = "Redirects", |
102 | }; | 102 | }; |
103 | 103 | ||
104 | 104 | ||
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 6ecb5e6fae2e..20083e0d3995 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -329,7 +329,7 @@ static inline int rt6_check_dev(struct rt6_info *rt, int oif) | |||
329 | static inline int rt6_check_neigh(struct rt6_info *rt) | 329 | static inline int rt6_check_neigh(struct rt6_info *rt) |
330 | { | 330 | { |
331 | struct neighbour *neigh = rt->rt6i_nexthop; | 331 | struct neighbour *neigh = rt->rt6i_nexthop; |
332 | int m = 0; | 332 | int m; |
333 | if (rt->rt6i_flags & RTF_NONEXTHOP || | 333 | if (rt->rt6i_flags & RTF_NONEXTHOP || |
334 | !(rt->rt6i_flags & RTF_GATEWAY)) | 334 | !(rt->rt6i_flags & RTF_GATEWAY)) |
335 | m = 1; | 335 | m = 1; |
@@ -337,10 +337,15 @@ static inline int rt6_check_neigh(struct rt6_info *rt) | |||
337 | read_lock_bh(&neigh->lock); | 337 | read_lock_bh(&neigh->lock); |
338 | if (neigh->nud_state & NUD_VALID) | 338 | if (neigh->nud_state & NUD_VALID) |
339 | m = 2; | 339 | m = 2; |
340 | else if (!(neigh->nud_state & NUD_FAILED)) | 340 | #ifdef CONFIG_IPV6_ROUTER_PREF |
341 | else if (neigh->nud_state & NUD_FAILED) | ||
342 | m = 0; | ||
343 | #endif | ||
344 | else | ||
341 | m = 1; | 345 | m = 1; |
342 | read_unlock_bh(&neigh->lock); | 346 | read_unlock_bh(&neigh->lock); |
343 | } | 347 | } else |
348 | m = 0; | ||
344 | return m; | 349 | return m; |
345 | } | 350 | } |
346 | 351 | ||