]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[IPV4]: Fix crash in ip_rcv while booting related to netconsole
authorHerbert Xu <herbert@gondor.apana.org.au>
Tue, 5 Jul 2005 21:40:10 +0000 (14:40 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Jul 2005 21:40:10 +0000 (14:40 -0700)
Makes IPv4 ip_rcv registration happen last in af_inet.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/af_inet.c
net/ipv4/ip_output.c

index 658e7977924dad3eb6cd2830d8158d2109e2c261..ef7468376ae62a1f4242052ea96df15b4bd6546a 100644 (file)
@@ -1009,6 +1009,15 @@ static int __init init_ipv4_mibs(void)
 static int ipv4_proc_init(void);
 extern void ipfrag_init(void);
 
+/*
+ *     IP protocol layer initialiser
+ */
+
+static struct packet_type ip_packet_type = {
+       .type = __constant_htons(ETH_P_IP),
+       .func = ip_rcv,
+};
+
 static int __init inet_init(void)
 {
        struct sk_buff *dummy_skb;
@@ -1102,6 +1111,8 @@ static int __init inet_init(void)
 
        ipfrag_init();
 
+       dev_add_pack(&ip_packet_type);
+
        rc = 0;
 out:
        return rc;
index 1bfa49eda96f121f6e71c0e923cdf21e541ce8c8..9de83e6e0f1d7b9dfc5223f0ac0e3c8750f49c17 100644 (file)
@@ -1328,23 +1328,8 @@ void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *ar
        ip_rt_put(rt);
 }
 
-/*
- *     IP protocol layer initialiser
- */
-
-static struct packet_type ip_packet_type = {
-       .type = __constant_htons(ETH_P_IP),
-       .func = ip_rcv,
-};
-
-/*
- *     IP registers the packet type and then calls the subprotocol initialisers
- */
-
 void __init ip_init(void)
 {
-       dev_add_pack(&ip_packet_type);
-
        ip_rt_init();
        inet_initpeers();