]> Pileus Git - ~andy/linux/blobdiff - net/ipv4/af_inet.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
[~andy/linux] / net / ipv4 / af_inet.c
index cad664bf3f2e53311aa74147c33c98f22e09e303..24eca23c2db3159c91898bd7fefe8bbb501f1233 100644 (file)
@@ -1077,7 +1077,7 @@ static int inet_sk_reselect_saddr(struct sock *sk)
 
        if (sysctl_ip_dynaddr > 1) {
                printk(KERN_INFO "%s(): shifting inet->"
-                                "saddr from %d.%d.%d.%d to %d.%d.%d.%d\n",
+                                "saddr from " NIPQUAD_FMT " to " NIPQUAD_FMT "\n",
                       __func__,
                       NIPQUAD(old_saddr),
                       NIPQUAD(new_saddr));
@@ -1234,7 +1234,7 @@ static struct sk_buff *inet_gso_segment(struct sk_buff *skb, int features)
                segs = ops->gso_segment(skb, features);
        rcu_read_unlock();
 
-       if (!segs || unlikely(IS_ERR(segs)))
+       if (!segs || IS_ERR(segs))
                goto out;
 
        skb = segs;
@@ -1251,7 +1251,8 @@ out:
 }
 
 int inet_ctl_sock_create(struct sock **sk, unsigned short family,
-                        unsigned short type, unsigned char protocol)
+                        unsigned short type, unsigned char protocol,
+                        struct net *net)
 {
        struct socket *sock;
        int rc = sock_create_kern(family, type, protocol, &sock);
@@ -1259,12 +1260,13 @@ int inet_ctl_sock_create(struct sock **sk, unsigned short family,
        if (rc == 0) {
                *sk = sock->sk;
                (*sk)->sk_allocation = GFP_ATOMIC;
-               inet_sk(*sk)->uc_ttl = -1;
                /*
                 * Unhash it so that IP input processing does not even see it,
                 * we do not wish this socket to see incoming packets.
                 */
                (*sk)->sk_prot->unhash(*sk);
+
+               sk_change_net(*sk, net);
        }
        return rc;
 }