From 510aedca29b216e829dbe536cff6662234157bf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Victor?= Date: Mon, 16 Jan 2023 09:21:27 +0100 Subject: [PATCH] Also non-ip-only tap devices want setup tap-without-bridge devices are also useful if they (as in old times) are setup with the IP addresses given in the config. Without setup, this has to be done manually which is more awkward. --- src/osdnet.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/osdnet.c b/src/osdnet.c index 038a5f2..fc41702 100644 --- a/src/osdnet.c +++ b/src/osdnet.c @@ -1899,10 +1899,10 @@ osn_pfinit_tuntap(struct pfdata *pfdata, struct osnpf *osnpf, void *arg) It should probably match the same network as the local address, especially if planning to connect from other machines. - This is only needed for TUNNEL devices, not TAP devices. + This is only needed for TUNNEL devices, not tap+bridge devices. */ -#if CENV_SYS_LINUX /* [BV: Linux tun device] */ - if (pfdata->pf_ip4_only) { +#if CENV_SYS_LINUX /* [BV: Linux tun/tap device with tunaddr set] */ + if (memcmp((char *)&ipremote, "\0\0\0\0", IP_ADRSIZ) != 0) { char cmdbuff[128]; /* "Hacky" but simple method */ int res;