]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv6/xfrm6_tunnel.c
splice: always updated atime in direct splice
[linux-2.6-omap-h63xx.git] / net / ipv6 / xfrm6_tunnel.c
index 6f87dd568dedf494bf93af3f1f4f7276ef9c3cfd..fae90ff310875eac20da4de63c56469ce53237eb 100644 (file)
@@ -84,7 +84,7 @@ static int xfrm6_tunnel_spi_init(void)
        xfrm6_tunnel_spi_kmem = kmem_cache_create("xfrm6_tunnel_spi",
                                                  sizeof(struct xfrm6_tunnel_spi),
                                                  0, SLAB_HWCACHE_ALIGN,
-                                                 NULL, NULL);
+                                                 NULL);
        if (!xfrm6_tunnel_spi_kmem)
                return -ENOMEM;
 
@@ -242,17 +242,13 @@ EXPORT_SYMBOL(xfrm6_tunnel_free_spi);
 
 static int xfrm6_tunnel_output(struct xfrm_state *x, struct sk_buff *skb)
 {
-       struct ipv6hdr *top_iph;
-
-       top_iph = (struct ipv6hdr *)skb->data;
-       top_iph->payload_len = htons(skb->len - sizeof(struct ipv6hdr));
-
+       skb_push(skb, -skb_network_offset(skb));
        return 0;
 }
 
 static int xfrm6_tunnel_input(struct xfrm_state *x, struct sk_buff *skb)
 {
-       return 0;
+       return skb_network_header(skb)[IP6CB(skb)->nhoff];
 }
 
 static int xfrm6_tunnel_rcv(struct sk_buff *skb)
@@ -261,7 +257,7 @@ static int xfrm6_tunnel_rcv(struct sk_buff *skb)
        __be32 spi;
 
        spi = xfrm6_tunnel_spi_lookup((xfrm_address_t *)&iph->saddr);
-       return xfrm6_rcv_spi(skb, spi) > 0 ? : 0;
+       return xfrm6_rcv_spi(skb, IPPROTO_IPV6, spi) > 0 ? : 0;
 }
 
 static int xfrm6_tunnel_err(struct sk_buff *skb, struct inet6_skb_parm *opt,