[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] tap-bsd: OpenBSD uses tap(4) now
From: |
Thomas Huth |
Subject: |
Re: [Qemu-devel] [PATCH] tap-bsd: OpenBSD uses tap(4) now |
Date: |
Mon, 26 Sep 2016 12:35:24 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 |
On 26.09.2016 03:58, Brad Smith wrote:
> Update the tap-bsd code now that OpenBSD uses tap(4).
>
> Signed-off-by: Brad Smith <address@hidden>
>
>
> diff --git a/net/tap-bsd.c b/net/tap-bsd.c
> index c506ac3..8d0f049 100644
> --- a/net/tap-bsd.c
> +++ b/net/tap-bsd.c
> @@ -55,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__)
> - 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) {
Looking at http://man.openbsd.org/tap.4 it seems like OpenBSD is indeed
supporting /dev/tap nowadays, so:
Reviewed-by: Thomas Huth <address@hidden>
PS: Please make sure to CC: the QEMU subsystem maintainer (see
MAINTAINERS or use scripts/get_maintainer.pl) to make sure that your
patches do not get lost in the high traffic of the qemu-devel mailing list.
signature.asc
Description: OpenPGP digital signature