]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: avoid get_random_int(), it's new
authorSage Weil <sage@newdream.net>
Tue, 1 Sep 2009 21:02:39 +0000 (14:02 -0700)
committerSage Weil <sage@newdream.net>
Tue, 1 Sep 2009 21:02:39 +0000 (14:02 -0700)
Just use get_random_bytes instead.

src/kernel/messenger.c

index 91f08e41623dda335540622c18c374684f166173..c8fb3c5c907bc598703f25ed07d310ca5d5f6828 100644 (file)
@@ -1559,7 +1559,8 @@ struct ceph_messenger *ceph_messenger_create(struct ceph_entity_addr *myaddr)
                dout("create ip not specified, initially INADDR_ANY\n");
                msgr->inst.addr.ipaddr.sin_addr.s_addr = htonl(INADDR_ANY);
                msgr->inst.addr.ipaddr.sin_port = htons(0);  /* any port */
-               msgr->inst.addr.nonce = get_random_int();
+               get_random_bytes(&msgr->inst.addr.nonce,
+                                sizeof(msgr->inst.addr.nonce));
        }
        msgr->inst.addr.ipaddr.sin_family = AF_INET;