git: ab2ae6b17c84 - main - net/mpd5: Fix incoming connections for static links (site-to-site VPN)

From: Eugene Grosbein <eugen_at_FreeBSD.org>
Date: Fri, 30 Dec 2022 06:26:48 UTC
The branch main has been updated by eugen:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ab2ae6b17c84a453269b780ec461ac382f7ce6e1

commit ab2ae6b17c84a453269b780ec461ac382f7ce6e1
Author:     Eugene Grosbein <eugen@FreeBSD.org>
AuthorDate: 2022-12-30 06:23:31 +0000
Commit:     Eugene Grosbein <eugen@FreeBSD.org>
CommitDate: 2022-12-30 06:23:31 +0000

    net/mpd5: Fix incoming connections for static links (site-to-site VPN)
    
    The change in 5.9_11 was incomplete as it did not fix
    broken handling of incoming connections for static links,
    f.e. site-to-site VPN.
    
    Import r2474 from upstream to fix it, too.
---
 net/mpd5/Makefile           | 2 +-
 net/mpd5/files/patch-redial | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/mpd5/Makefile b/net/mpd5/Makefile
index 2d605bfabff0..a2d7c85e8dad 100644
--- a/net/mpd5/Makefile
+++ b/net/mpd5/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	mpd
 DISTVERSION=	5.9
-PORTREVISION=	12
+PORTREVISION=	13
 CATEGORIES=	net
 MASTER_SITES=	SF/${PORTNAME}/Mpd5/Mpd-${PORTVERSION}
 PKGNAMESUFFIX=	5
diff --git a/net/mpd5/files/patch-redial b/net/mpd5/files/patch-redial
index 525e13836a56..6bd5be6ad6e4 100644
--- a/net/mpd5/files/patch-redial
+++ b/net/mpd5/files/patch-redial
@@ -164,7 +164,7 @@ Index: src/phys.c
  	}
 -        (*l->type->open)(l);
 +	/* Redial may result in MSG_OPEN for just opened device */
-+	if (l->state == PHYS_STATE_DOWN || l->state == PHYS_STATE_CONNECTING)
++	if (l->state != PHYS_STATE_UP)
 +	    (*l->type->open)(l);
 +	else
 +	    Log(LG_PHYS2, ("[%s] device: OPEN event ignored",