]> err.no Git - linux-2.6/blobdiff - net/ipv4/ip_input.c
ipvs: Put backup thread on mcast socket wait queue
[linux-2.6] / net / ipv4 / ip_input.c
index 2aeea5d154252a9e7d96043420658f0db674ae6f..7c26428ea67bf1afdb8753dd5725584d9d0c6ac2 100644 (file)
@@ -5,8 +5,6 @@
  *
  *             The Internet Protocol (IP) module.
  *
- * Version:    $Id: ip_input.c,v 1.55 2002/01/12 07:39:45 davem Exp $
- *
  * Authors:    Ross Biro
  *             Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
  *             Donald Becker, <becker@super.org>
@@ -172,7 +170,7 @@ int ip_call_ra_chain(struct sk_buff *skb)
                if (sk && inet_sk(sk)->num == protocol &&
                    (!sk->sk_bound_dev_if ||
                     sk->sk_bound_dev_if == dev->ifindex) &&
-                   sk->sk_net == dev->nd_net) {
+                   sock_net(sk) == dev_net(dev)) {
                        if (ip_hdr(skb)->frag_off & htons(IP_MF | IP_OFFSET)) {
                                if (ip_defrag(skb, IP_DEFRAG_CALL_RA_CHAIN)) {
                                        read_unlock(&ip_ra_lock);
@@ -199,7 +197,7 @@ int ip_call_ra_chain(struct sk_buff *skb)
 
 static int ip_local_deliver_finish(struct sk_buff *skb)
 {
-       struct net *net = skb->dev->nd_net;
+       struct net *net = dev_net(skb->dev);
 
        __skb_pull(skb, ip_hdrlen(skb));
 
@@ -291,7 +289,7 @@ static inline int ip_rcv_options(struct sk_buff *skb)
        opt = &(IPCB(skb)->opt);
        opt->optlen = iph->ihl*4 - sizeof(struct iphdr);
 
-       if (ip_options_compile(dev->nd_net, opt, skb)) {
+       if (ip_options_compile(dev_net(dev), opt, skb)) {
                IP_INC_STATS_BH(IPSTATS_MIB_INHDRERRORS);
                goto drop;
        }
@@ -303,7 +301,7 @@ static inline int ip_rcv_options(struct sk_buff *skb)
                                if (IN_DEV_LOG_MARTIANS(in_dev) &&
                                    net_ratelimit())
                                        printk(KERN_INFO "source route option "
-                                              "%u.%u.%u.%u -> %u.%u.%u.%u\n",
+                                              NIPQUAD_FMT " -> " NIPQUAD_FMT "\n",
                                               NIPQUAD(iph->saddr),
                                               NIPQUAD(iph->daddr));
                                in_dev_put(in_dev);
@@ -397,7 +395,7 @@ int ip_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt,
        iph = ip_hdr(skb);
 
        /*
-        *      RFC1122: 3.1.2.2 MUST silently discard any IP frame that fails the checksum.
+        *      RFC1122: 3.2.1.2 MUST silently discard any IP frame that fails the checksum.
         *
         *      Is the datagram acceptable?
         *