Skip to content

Commit 83985ec

Browse files
committed
fix not beeing able to detect lost connection from the outside.
1 parent b62af2c commit 83985ec

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/wireguardif.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,9 @@ err_t wireguardif_peer_is_up(struct netif *netif, u8_t peer_index, ip_addr_t *cu
710710
struct wireguard_peer *peer;
711711
err_t result = wireguardif_lookup_peer(netif, peer_index, &peer);
712712
if (result == ERR_OK) {
713-
if ((peer->curr_keypair.valid) || (peer->prev_keypair.valid)) {
713+
// If some kind of weird connection errors occure we need to add the condition " || (peer->prev_keypair.valid)"
714+
// back and find another way to check correctly if the peer is up.
715+
if ((peer->curr_keypair.valid)) {
714716
result = ERR_OK;
715717
} else {
716718
result = ERR_CONN;

0 commit comments

Comments
 (0)