aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ip6_output.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/ip6_output.c')
-rw-r--r--net/ipv6/ip6_output.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index dae1949019d7..d5d20cde8d92 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -381,9 +381,8 @@ int ip6_forward(struct sk_buff *skb)
381 * cannot be fragmented, because there is no warranty 381 * cannot be fragmented, because there is no warranty
382 * that different fragments will go along one path. --ANK 382 * that different fragments will go along one path. --ANK
383 */ 383 */
384 if (opt->ra) { 384 if (unlikely(opt->flags & IP6SKB_ROUTERALERT)) {
385 u8 *ptr = skb_network_header(skb) + opt->ra; 385 if (ip6_call_ra_chain(skb, ntohs(opt->ra)))
386 if (ip6_call_ra_chain(skb, (ptr[2]<<8) + ptr[3]))
387 return 0; 386 return 0;
388 } 387 }
389 388
@@ -822,11 +821,17 @@ static struct dst_entry *ip6_sk_dst_check(struct sock *sk,
822 const struct flowi6 *fl6) 821 const struct flowi6 *fl6)
823{ 822{
824 struct ipv6_pinfo *np = inet6_sk(sk); 823 struct ipv6_pinfo *np = inet6_sk(sk);
825 struct rt6_info *rt = (struct rt6_info *)dst; 824 struct rt6_info *rt;
826 825
827 if (!dst) 826 if (!dst)
828 goto out; 827 goto out;
829 828
829 if (dst->ops->family != AF_INET6) {
830 dst_release(dst);
831 return NULL;
832 }
833
834 rt = (struct rt6_info *)dst;
830 /* Yes, checking route validity in not connected 835 /* Yes, checking route validity in not connected
831 * case is not very simple. Take into account, 836 * case is not very simple. Take into account,
832 * that we do not support routing by source, TOS, 837 * that we do not support routing by source, TOS,