+clib_error_t *
+crypto_ipsecmb_iv_init (ipsecmb_main_t * imbm)
+{
+ ipsecmb_per_thread_data_t *ptd;
+ clib_error_t *err = 0;
+ int fd;
+
+ if ((fd = open ("/dev/urandom", O_RDONLY)) < 0)
+ return clib_error_return_unix (0, "failed to open '/dev/urandom'");
+
+ vec_foreach (ptd, imbm->per_thread_data)
+ {
+ if (read (fd, &ptd->cbc_iv, sizeof (ptd->cbc_iv)) != sizeof (ptd->cbc_iv))
+ {
+ err = clib_error_return_unix (0, "'/dev/urandom' read failure");
+ return (err);
+ }
+ }
+
+ return (NULL);
+}
+