projects
/
oweals
/
tinc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8afb52a
)
Fix crash at startup when Device is not specified on OS X.
author
Guus Sliepen
<guus@tinc-vpn.org>
Fri, 15 Apr 2016 14:30:45 +0000
(16:30 +0200)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Fri, 15 Apr 2016 14:30:45 +0000
(16:30 +0200)
src/bsd/device.c
patch
|
blob
|
history
diff --git
a/src/bsd/device.c
b/src/bsd/device.c
index 303e9b6840de8d29163c720354670714fcbc2147..0d41c96f8b67a420d436a94d89b0db79e40dee11 100644
(file)
--- a/
src/bsd/device.c
+++ b/
src/bsd/device.c
@@
-147,7
+147,7
@@
static bool setup_device(void) {
}
} else {
#ifdef HAVE_NET_IF_UTUN_H
- if(
strncmp(device, "utun", 4) == 0 || strncmp(device, "/dev/utun", 9) == 0
)
+ if(
device && (strncmp(device, "utun", 4) == 0 || strncmp(device, "/dev/utun", 9) == 0)
)
device_type = DEVICE_TYPE_UTUN;
else
#endif