]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv6/ip6_input.c
[NETNS][FRAGS]: Make the LRU list per namespace.
[linux-2.6-omap-h63xx.git] / net / ipv6 / ip6_input.c
index 9149fc239759972d9ddbde68330a9ca572f2569e..178aebc0427a1d05051598b9ab2f6b233abfbb66 100644 (file)
@@ -125,7 +125,7 @@ int ipv6_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt
        }
 
        if (hdr->nexthdr == NEXTHDR_HOP) {
-               if (ipv6_parse_hopopts(&skb) < 0) {
+               if (ipv6_parse_hopopts(skb) < 0) {
                        IP6_INC_STATS_BH(idev, IPSTATS_MIB_INHDRERRORS);
                        rcu_read_unlock();
                        return 0;
@@ -134,7 +134,8 @@ int ipv6_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt
 
        rcu_read_unlock();
 
-       return NF_HOOK(PF_INET6,NF_IP6_PRE_ROUTING, skb, dev, NULL, ip6_rcv_finish);
+       return NF_HOOK(PF_INET6, NF_INET_PRE_ROUTING, skb, dev, NULL,
+                      ip6_rcv_finish);
 err:
        IP6_INC_STATS_BH(idev, IPSTATS_MIB_INHDRERRORS);
 drop:
@@ -149,12 +150,11 @@ out:
  */
 
 
-static inline int ip6_input_finish(struct sk_buff *skb)
+static int ip6_input_finish(struct sk_buff *skb)
 {
        struct inet6_protocol *ipprot;
-       struct sock *raw_sk;
        unsigned int nhoff;
-       int nexthdr;
+       int nexthdr, raw;
        u8 hash;
        struct inet6_dev *idev;
 
@@ -170,9 +170,7 @@ resubmit:
        nhoff = IP6CB(skb)->nhoff;
        nexthdr = skb_network_header(skb)[nhoff];
 
-       raw_sk = sk_head(&raw_v6_htable[nexthdr & (MAX_INET_PROTOS - 1)]);
-       if (raw_sk && !ipv6_raw_deliver(skb, nexthdr))
-               raw_sk = NULL;
+       raw = raw6_local_deliver(skb, nexthdr);
 
        hash = nexthdr & (MAX_INET_PROTOS - 1);
        if ((ipprot = rcu_dereference(inet6_protos[hash])) != NULL) {
@@ -199,13 +197,13 @@ resubmit:
                    !xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb))
                        goto discard;
 
-               ret = ipprot->handler(&skb);
+               ret = ipprot->handler(skb);
                if (ret > 0)
                        goto resubmit;
                else if (ret == 0)
                        IP6_INC_STATS_BH(idev, IPSTATS_MIB_INDELIVERS);
        } else {
-               if (!raw_sk) {
+               if (!raw) {
                        if (xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb)) {
                                IP6_INC_STATS_BH(idev, IPSTATS_MIB_INUNKNOWNPROTOS);
                                icmpv6_send(skb, ICMPV6_PARAMPROB,
@@ -229,7 +227,8 @@ discard:
 
 int ip6_input(struct sk_buff *skb)
 {
-       return NF_HOOK(PF_INET6,NF_IP6_LOCAL_IN, skb, skb->dev, NULL, ip6_input_finish);
+       return NF_HOOK(PF_INET6, NF_INET_LOCAL_IN, skb, skb->dev, NULL,
+                      ip6_input_finish);
 }
 
 int ip6_mc_input(struct sk_buff *skb)