[IPV6] ROUTE: Routing by FWMARK.
[safe/jmp/linux-2.6] / net / ipv4 / ip_gre.c
index 1e93eaf..e66f6ff 100644 (file)
@@ -10,7 +10,7 @@
  *
  */
 
-#include <linux/config.h>
+#include <linux/capability.h>
 #include <linux/module.h>
 #include <linux/types.h>
 #include <linux/sched.h>
@@ -576,7 +576,7 @@ static int ipgre_rcv(struct sk_buff *skb)
 
                if (flags&GRE_CSUM) {
                        switch (skb->ip_summed) {
-                       case CHECKSUM_HW:
+                       case CHECKSUM_COMPLETE:
                                csum = (u16)csum_fold(skb->csum);
                                if (!csum)
                                        break;
@@ -584,7 +584,7 @@ static int ipgre_rcv(struct sk_buff *skb)
                        case CHECKSUM_NONE:
                                skb->csum = 0;
                                csum = __skb_checksum_complete(skb);
-                               skb->ip_summed = CHECKSUM_HW;
+                               skb->ip_summed = CHECKSUM_COMPLETE;
                        }
                        offset += 4;
                }
@@ -617,7 +617,6 @@ static int ipgre_rcv(struct sk_buff *skb)
                skb->mac.raw = skb->nh.raw;
                skb->nh.raw = __pskb_pull(skb, offset);
                skb_postpull_rcsum(skb, skb->h.raw, offset);
-               memset(&(IPCB(skb)->opt), 0, sizeof(struct ip_options));
                skb->pkt_type = PACKET_HOST;
 #ifdef CONFIG_NET_IPGRE_BROADCAST
                if (MULTICAST(iph->daddr)) {
@@ -655,7 +654,7 @@ static int ipgre_rcv(struct sk_buff *skb)
                read_unlock(&ipgre_lock);
                return(0);
        }
-       icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PROT_UNREACH, 0);
+       icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0);
 
 drop:
        read_unlock(&ipgre_lock);
@@ -829,7 +828,8 @@ static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
        skb->h.raw = skb->nh.raw;
        skb->nh.raw = skb_push(skb, gre_hlen);
        memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
-       IPCB(skb)->flags &= ~(IPSKB_XFRM_TUNNEL_SIZE|IPSKB_XFRM_TRANSFORMED);
+       IPCB(skb)->flags &= ~(IPSKB_XFRM_TUNNEL_SIZE | IPSKB_XFRM_TRANSFORMED |
+                             IPSKB_REROUTED);
        dst_release(skb->dst);
        skb->dst = &rt->u.dst;