[Libvirt-cim] [PATCH] Make the 'default' NetRASD allocation include a randomly-generated MAC
Jay Gagnon
grendel at linux.vnet.ibm.com
Mon Apr 14 17:59:43 UTC 2008
Dan Smith wrote:
> # HG changeset patch
> # User Dan Smith <danms at us.ibm.com>
> # Date 1208189730 25200
> # Node ID abf9b4881cc061cca318fe39c3c849f01316cdc8
> # Parent da267e967adbd316d30303cc064584ebd36d7123
> Make the 'default' NetRASD allocation include a randomly-generated MAC
>
> No changes from last time, except I think this can be put in by itself,
> to reduce the size of my queue for the VSMS stuff.
>
> Signed-off-by: Dan Smith <danms at us.ibm.com>
>
>
> static struct sdc_rasd_prop *net_def(const CMPIObjectPath *ref,
> CMPIStatus *s)
> {
> @@ -440,6 +482,7 @@ static struct sdc_rasd_prop *net_def(con
> struct sdc_rasd_prop tmp[] = {
> {"InstanceID", (CMPIValue *)"Default", CMPI_chars},
> {"VirtualQuantity", (CMPIValue *)&num_nics, CMPI_uint16},
> + {"Address", (CMPIValue *)_net_rand_mac(), CMPI_chars},
> PROP_END
> };
>
Is this going to segfault if _net_rand_mac() hits an error and comes
back NULL? Or is the code that actually turns the struct into an inst
able to handle that gracefully?
--
-Jay
More information about the Libvirt-cim
mailing list