Always detach encap handler when reconfiguring tunnel.

Reported by:	hrs
MFC after:	1 week
This commit is contained in:
Andrey V. Elsukov 2015-10-03 03:57:58 +00:00
parent 56afe65ca9
commit 1a6fb597b0

View File

@ -623,7 +623,7 @@ gre_set_tunnel(struct ifnet *ifp, struct sockaddr *src,
default:
return (EAFNOSUPPORT);
}
if (sc->gre_family != src->sa_family)
if (sc->gre_family != 0)
gre_detach(sc);
GRE_WLOCK(sc);
if (sc->gre_family != 0)