On Mon, Jul 11, 2016 at 11:56:41PM -0700, Justin Pettit wrote:
> A future commit will reduce the amount of conversions used by the
> existing users of 'lport_addresses'.  This change will also make it
> possible to use this structure for logical router port networks.
> 
> Signed-off-by: Justin Pettit <jpet...@ovn.org>

There's a lot of dynamic allocation here for strings that have a
specific length or a small bound.  For example, 'ea_s' in struct
lport_addresses is always ETH_ADDR_STRLEN bytes long plus a null
terminator, but the code uses xasprintf().  Similarly, for IPv4 address
strings only INET_ADDRSTRLEN + 1 bytes, which is only 17 bytes, are
needed.  I guess for most IPv6 addresses INET6_ADDRSTRLEN + 1 bytes,
which is 47, might be overkill.

Acked-by: Ben Pfaff <b...@ovn.org>

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to