]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - net/ipv4/ip_options.c
Merge branch 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile...
[mv-sheeva.git] / net / ipv4 / ip_options.c
index 4c09a31fd140c115a6f9cb4469d3f62aa10e56ae..ba9836c488ed915388e4c9d38b842bef8b241dda 100644 (file)
@@ -238,7 +238,6 @@ void ip_options_fragment(struct sk_buff * skb)
        opt->rr_needaddr = 0;
        opt->ts_needaddr = 0;
        opt->ts_needtime = 0;
-       return;
 }
 
 /*
@@ -601,6 +600,7 @@ int ip_options_rcv_srr(struct sk_buff *skb)
        unsigned char *optptr = skb_network_header(skb) + opt->srr;
        struct rtable *rt = skb_rtable(skb);
        struct rtable *rt2;
+       unsigned long orefdst;
        int err;
 
        if (!opt->srr)
@@ -624,16 +624,16 @@ int ip_options_rcv_srr(struct sk_buff *skb)
                }
                memcpy(&nexthop, &optptr[srrptr-1], 4);
 
-               rt = skb_rtable(skb);
+               orefdst = skb->_skb_refdst;
                skb_dst_set(skb, NULL);
                err = ip_route_input(skb, nexthop, iph->saddr, iph->tos, skb->dev);
                rt2 = skb_rtable(skb);
                if (err || (rt2->rt_type != RTN_UNICAST && rt2->rt_type != RTN_LOCAL)) {
-                       ip_rt_put(rt2);
-                       skb_dst_set(skb, &rt->u.dst);
+                       skb_dst_drop(skb);
+                       skb->_skb_refdst = orefdst;
                        return -EINVAL;
                }
-               ip_rt_put(rt);
+               refdst_drop(orefdst);
                if (rt2->rt_type != RTN_LOCAL)
                        break;
                /* Superfast 8) loopback forward */