~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to net/ipv4/ip_options.c

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno, Martin Michlmayr
  • Date: 2011-04-06 13:53:30 UTC
  • mfrom: (43.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20110406135330-wjufxhd0tvn3zx4z
Tags: 2.6.38-3
[ Ben Hutchings ]
* [ppc64] Add to linux-tools package architectures (Closes: #620124)
* [amd64] Save cr4 to mmu_cr4_features at boot time (Closes: #620284)
* appletalk: Fix bugs introduced when removing use of BKL
* ALSA: Fix yet another race in disconnection
* cciss: Fix lost command issue
* ath9k: Fix kernel panic in AR2427
* ses: Avoid kernel panic when lun 0 is not mapped
* PCI/ACPI: Report ASPM support to BIOS if not disabled from command line

[ Aurelien Jarno ]
* rtlwifi: fix build when PCI is not enabled.

[ Martin Michlmayr ]
* rtlwifi: Eliminate udelay calls with too large values (Closes: #620204)

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
#include <linux/capability.h>
13
13
#include <linux/module.h>
 
14
#include <linux/slab.h>
14
15
#include <linux/types.h>
15
16
#include <asm/uaccess.h>
16
17
#include <linux/skbuff.h>
237
238
        opt->rr_needaddr = 0;
238
239
        opt->ts_needaddr = 0;
239
240
        opt->ts_needtime = 0;
240
 
        return;
241
241
}
242
242
 
243
243
/*
466
466
        }
467
467
        return -EINVAL;
468
468
}
469
 
 
 
469
EXPORT_SYMBOL(ip_options_compile);
470
470
 
471
471
/*
472
472
 *      Undo all the changes done by ip_options_compile().
600
600
        unsigned char *optptr = skb_network_header(skb) + opt->srr;
601
601
        struct rtable *rt = skb_rtable(skb);
602
602
        struct rtable *rt2;
 
603
        unsigned long orefdst;
603
604
        int err;
604
605
 
605
606
        if (!opt->srr)
623
624
                }
624
625
                memcpy(&nexthop, &optptr[srrptr-1], 4);
625
626
 
626
 
                rt = skb_rtable(skb);
 
627
                orefdst = skb->_skb_refdst;
627
628
                skb_dst_set(skb, NULL);
628
629
                err = ip_route_input(skb, nexthop, iph->saddr, iph->tos, skb->dev);
629
630
                rt2 = skb_rtable(skb);
630
631
                if (err || (rt2->rt_type != RTN_UNICAST && rt2->rt_type != RTN_LOCAL)) {
631
 
                        ip_rt_put(rt2);
632
 
                        skb_dst_set(skb, &rt->u.dst);
 
632
                        skb_dst_drop(skb);
 
633
                        skb->_skb_refdst = orefdst;
633
634
                        return -EINVAL;
634
635
                }
635
 
                ip_rt_put(rt);
 
636
                refdst_drop(orefdst);
636
637
                if (rt2->rt_type != RTN_LOCAL)
637
638
                        break;
638
639
                /* Superfast 8) loopback forward */
645
646
        }
646
647
        return 0;
647
648
}
 
649
EXPORT_SYMBOL(ip_options_rcv_srr);