mirror of
https://github.com/openvswitch/ovs
synced 2025-08-30 22:05:19 +00:00
netdev-vport: Don't return static data in netdev_vport_get_dpif_port().
Returning a static data buffer makes code more brittle and definitely not thread-safe, so this commit switches to using a caller-provided buffer instead. Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
@@ -484,7 +484,9 @@ dpif_linux_port_add(struct dpif *dpif_, struct netdev *netdev,
|
||||
{
|
||||
struct dpif_linux *dpif = dpif_linux_cast(dpif_);
|
||||
const struct netdev_tunnel_config *tnl_cfg;
|
||||
const char *name = netdev_vport_get_dpif_port(netdev);
|
||||
char namebuf[NETDEV_VPORT_NAME_BUFSIZE];
|
||||
const char *name = netdev_vport_get_dpif_port(netdev,
|
||||
namebuf, sizeof namebuf);
|
||||
const char *type = netdev_get_type(netdev);
|
||||
struct dpif_linux_vport request, reply;
|
||||
struct nl_sock *sock = NULL;
|
||||
|
Reference in New Issue
Block a user