Page MenuHomeFreeBSD

D46651.diff
No OneTemporary

D46651.diff

diff --git a/sys/net/if_ovpn.c b/sys/net/if_ovpn.c
--- a/sys/net/if_ovpn.c
+++ b/sys/net/if_ovpn.c
@@ -511,6 +511,7 @@
int fd;
uint32_t peerid;
int ret = 0;
+ bool setcb = false;
if (nvl == NULL)
return (EINVAL);
@@ -631,6 +632,7 @@
* we're destroying the ifp.
*/
soref(sc->so);
+ setcb = true;
}
/* Insert the peer into the list. */
@@ -638,9 +640,11 @@
sc->peercount++;
OVPN_WUNLOCK(sc);
- ret = udp_set_kernel_tunneling(sc->so, ovpn_udp_input, NULL, sc);
- MPASS(ret == 0 || ret == EBUSY);
- ret = 0;
+
+ if (setcb) {
+ ret = udp_set_kernel_tunneling(sc->so, ovpn_udp_input, NULL, sc);
+ MPASS(ret == 0);
+ }
goto done;

File Metadata

Mime Type
text/plain
Expires
Mon, Oct 27, 9:50 PM (12 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
24317967
Default Alt Text
D46651.diff (669 B)

Event Timeline