mirror of
https://github.com/openvswitch/ovs
synced 2025-09-02 15:25:22 +00:00
netdev-bsd: Fix typo in label name.
Signed-off-by: Ben Pfaff <blp@nicira.com> CC: Ed Maste <emaste@freebsd.org>
This commit is contained in:
@@ -363,14 +363,14 @@ netdev_bsd_create_tap(const struct netdev_class *class, const char *name,
|
|||||||
if (netdev->tap_fd < 0) {
|
if (netdev->tap_fd < 0) {
|
||||||
error = errno;
|
error = errno;
|
||||||
VLOG_WARN("opening \"/dev/tap\" failed: %s", ovs_strerror(error));
|
VLOG_WARN("opening \"/dev/tap\" failed: %s", ovs_strerror(error));
|
||||||
goto error_undef_notifier;
|
goto error_unref_notifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Retrieve tap name (e.g. tap0) */
|
/* Retrieve tap name (e.g. tap0) */
|
||||||
if (ioctl(netdev->tap_fd, TAPGIFNAME, &ifr) == -1) {
|
if (ioctl(netdev->tap_fd, TAPGIFNAME, &ifr) == -1) {
|
||||||
/* XXX Need to destroy the device? */
|
/* XXX Need to destroy the device? */
|
||||||
error = errno;
|
error = errno;
|
||||||
goto error_undef_notifier;
|
goto error_unref_notifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Change the name of the tap device */
|
/* Change the name of the tap device */
|
||||||
@@ -379,7 +379,7 @@ netdev_bsd_create_tap(const struct netdev_class *class, const char *name,
|
|||||||
if (ioctl(af_inet_sock, SIOCSIFNAME, &ifr) == -1) {
|
if (ioctl(af_inet_sock, SIOCSIFNAME, &ifr) == -1) {
|
||||||
error = errno;
|
error = errno;
|
||||||
destroy_tap(netdev->tap_fd, ifr.ifr_name);
|
destroy_tap(netdev->tap_fd, ifr.ifr_name);
|
||||||
goto error_undef_notifier;
|
goto error_unref_notifier;
|
||||||
}
|
}
|
||||||
kernel_name = xstrdup(name);
|
kernel_name = xstrdup(name);
|
||||||
#else
|
#else
|
||||||
@@ -394,7 +394,7 @@ netdev_bsd_create_tap(const struct netdev_class *class, const char *name,
|
|||||||
error = set_nonblocking(netdev->tap_fd);
|
error = set_nonblocking(netdev->tap_fd);
|
||||||
if (error) {
|
if (error) {
|
||||||
destroy_tap(netdev->tap_fd, kernel_name);
|
destroy_tap(netdev->tap_fd, kernel_name);
|
||||||
goto error_undef_notifier;
|
goto error_unref_notifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Turn device UP */
|
/* Turn device UP */
|
||||||
@@ -403,7 +403,7 @@ netdev_bsd_create_tap(const struct netdev_class *class, const char *name,
|
|||||||
if (ioctl(af_inet_sock, SIOCSIFFLAGS, &ifr) == -1) {
|
if (ioctl(af_inet_sock, SIOCSIFFLAGS, &ifr) == -1) {
|
||||||
error = errno;
|
error = errno;
|
||||||
destroy_tap(netdev->tap_fd, kernel_name);
|
destroy_tap(netdev->tap_fd, kernel_name);
|
||||||
goto error_undef_notifier;
|
goto error_unref_notifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* initialize the device structure and
|
/* initialize the device structure and
|
||||||
@@ -414,7 +414,7 @@ netdev_bsd_create_tap(const struct netdev_class *class, const char *name,
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error_undef_notifier:
|
error_unref_notifier:
|
||||||
cache_notifier_unref();
|
cache_notifier_unref();
|
||||||
error:
|
error:
|
||||||
free(netdev);
|
free(netdev);
|
||||||
|
Reference in New Issue
Block a user