Commit 8d6cd190 authored by Sophie Brun's avatar Sophie Brun

Import an upstream patch to handle correctly not compatible alias db

parent 9d23b161
From 85c2d0b4fa5136aab95043ab73296ca185f6824e Mon Sep 17 00:00:00 2001
From: evilsocket <evilsocket@gmail.com>
Date: Thu, 22 Nov 2018 13:06:29 +0100
Subject: [PATCH] fix: gracefully handling corrupted or not compatible alias
databases (fixes #391)
---
network/lan.go | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/network/lan.go b/network/lan.go
index af03b67a..7090a654 100644
--- a/network/lan.go
+++ b/network/lan.go
@@ -2,6 +2,7 @@ package network
import (
"encoding/json"
+ "fmt"
"net"
"strings"
"sync"
@@ -36,7 +37,7 @@ type lanJSON struct {
func NewLAN(iface, gateway *Endpoint, newcb EndpointNewCallback, lostcb EndpointLostCallback) *LAN {
aliases, err := data.NewUnsortedKV(aliasesFileName, data.FlushOnEdit)
if err != nil {
- panic(err)
+ fmt.Printf("error loading %s: %s", aliasesFileName, err)
}
return &LAN{
drop-failing-test-aliases.patch
fix-build-raw-i386.patch
fix-lan.go.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment