~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to net/ipv4/ipcomp.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
{
28
28
        struct net *net = dev_net(skb->dev);
29
29
        __be32 spi;
30
 
        struct iphdr *iph = (struct iphdr *)skb->data;
 
30
        const struct iphdr *iph = (const struct iphdr *)skb->data;
31
31
        struct ip_comp_hdr *ipch = (struct ip_comp_hdr *)(skb->data+(iph->ihl<<2));
32
32
        struct xfrm_state *x;
33
33
 
36
36
                return;
37
37
 
38
38
        spi = htonl(ntohs(ipch->cpi));
39
 
        x = xfrm_state_lookup(net, skb->mark, (xfrm_address_t *)&iph->daddr,
 
39
        x = xfrm_state_lookup(net, skb->mark, (const xfrm_address_t *)&iph->daddr,
40
40
                              spi, IPPROTO_COMP, AF_INET);
41
41
        if (!x)
42
42
                return;