qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] tap-bsd: Remove special casing for older OpenBSD releases


From: Jason Wang
Subject: Re: [PATCH] tap-bsd: Remove special casing for older OpenBSD releases
Date: Mon, 29 Mar 2021 11:58:13 +0800
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.8.1


在 2021/3/29 上午11:03, Brad Smith 写道:
It very much is correct. We don't care about such releases anymore.


So is there a doc/wiki to say Qemu doesn't support those OpenBSD release?

Thanks



On March 28, 2021 10:24:51 p.m. Jason Wang <jasowang@redhat.com> wrote:

在 2021/3/27 上午7:49, Brad Smith 写道:
OpenBSD added support for tap(4) 10 releases ago.

Remove the special casing for older releases.


Signed-off-by: Brad Smith <brad@comstyle.com>

diff --git a/net/tap-bsd.c b/net/tap-bsd.c
index 77aaf674b1..59dfcdfae0 100644
--- a/net/tap-bsd.c
+++ b/net/tap-bsd.c
@@ -35,10 +35,6 @@
#include <net/if_tap.h>
#endif

-#if defined(__OpenBSD__)
-#include <sys/param.h>
-#endif
-
#ifndef __FreeBSD__
int tap_open(char *ifname, int ifname_size, int *vnet_hdr,
       int vnet_hdr_required, int mq_required, Error **errp)
@@ -59,11 +55,7 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr,
  if (*ifname) {
      snprintf(dname, sizeof dname, "/dev/%s", ifname);
  } else {
-#if defined(__OpenBSD__) && OpenBSD < 201605


I am not sure this sis correct. My understanding is that we still need
to use tun for old OpenBSD release.

Thanks


-            snprintf(dname, sizeof dname, "/dev/tun%d", i);
-#else
      snprintf(dname, sizeof dname, "/dev/tap%d", i);
-#endif
  }
  TFR(fd = open(dname, O_RDWR));
  if (fd >= 0) {


Sent with Aqua Mail for Android <https://play.google.com/store/apps/details?id=org.kman.AquaMail> https://www.mobisystems.com/aqua-mail <https://www.mobisystems.com/aqua-mail>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]