[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 10/10] tap-bsd: Remove special casing for older OpenBSD releases
From: |
Jason Wang |
Subject: |
[PULL 10/10] tap-bsd: Remove special casing for older OpenBSD releases |
Date: |
Sat, 8 May 2021 15:18:39 +0800 |
From: Brad Smith <brad@comstyle.com>
OpenBSD added support for tap(4) 10 releases ago.
Remove the special casing for older releases.
Signed-off-by: Brad Smith <brad@comstyle.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
net/tap-bsd.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/net/tap-bsd.c b/net/tap-bsd.c
index 4f64f31..e45a6d1 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
- 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) {
--
2.7.4
- [PULL 01/10] net/tap: Added TUNSETSTEERINGEBPF code., (continued)
- [PULL 01/10] net/tap: Added TUNSETSTEERINGEBPF code., Jason Wang, 2021/05/08
- [PULL 02/10] net: Added SetSteeringEBPF method for NetClientState., Jason Wang, 2021/05/08
- [PULL 03/10] ebpf: Added eBPF RSS program., Jason Wang, 2021/05/08
- [PULL 05/10] virtio-net: Added eBPF RSS to virtio-net., Jason Wang, 2021/05/08
- [PULL 06/10] docs: Added eBPF documentation., Jason Wang, 2021/05/08
- [PULL 07/10] MAINTAINERS: Added eBPF maintainers information., Jason Wang, 2021/05/08
- [PULL 08/10] hw/net/imx_fec: return 0xffff when accessing non-existing PHY, Jason Wang, 2021/05/08
- [PULL 04/10] ebpf: Added eBPF RSS loader., Jason Wang, 2021/05/08
- [PULL 09/10] virtio-net: failover: add missing remove_migration_state_change_notifier(), Jason Wang, 2021/05/08
- [PULL 10/10] tap-bsd: Remove special casing for older OpenBSD releases,
Jason Wang <=
- Re: [PULL 00/10] Net patches, no-reply, 2021/05/08
- Re: [PULL 00/10] Net patches, Peter Maydell, 2021/05/11