Add basic pledge/unveil sandbox on OpenBSD
[tinc] / src / dummy_device.c
index 80232e1..4ffaf38 100644 (file)
 static const char *device_info = "dummy device";
 
 static bool setup_device(void) {
-       device = xstrdup("dummy");
-       iface = xstrdup("dummy");
+       device = xstrdup(DEVICE_DUMMY);
+       iface = xstrdup(DEVICE_DUMMY);
        logger(DEBUG_ALWAYS, LOG_INFO, "%s (%s) is a %s", device, iface, device_info);
        return true;
 }
 
 static void close_device(void) {
+       free(iface);
+       iface = NULL;
+       free(device);
+       device = NULL;
 }
 
 static bool read_packet(vpn_packet_t *packet) {
+       (void)packet;
        return false;
 }
 
 static bool write_packet(vpn_packet_t *packet) {
+       (void)packet;
        return true;
 }