Date: Tue, 26 May 2026 09:57:01 +0000 From: Olivier Cochard <olivier@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: ad986f4312e3 - main - net/mlvpn: Update to 2.3.5 Message-ID: <6a156e6d.32a78.1a87031@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by olivier: URL: https://cgit.FreeBSD.org/ports/commit/?id=ad986f4312e3dac10b3a3140e9ef85cf7dae495f commit ad986f4312e3dac10b3a3140e9ef85cf7dae495f Author: Olivier Cochard <olivier@FreeBSD.org> AuthorDate: 2026-05-26 09:55:38 +0000 Commit: Olivier Cochard <olivier@FreeBSD.org> CommitDate: 2026-05-26 09:55:38 +0000 net/mlvpn: Update to 2.3.5 --- net/mlvpn/Makefile | 3 +- net/mlvpn/distinfo | 5 ++- net/mlvpn/files/patch-src_config.c | 57 --------------------------- net/mlvpn/files/patch-src_mlvpn.c | 68 ++++++++++----------------------- net/mlvpn/files/patch-src_mlvpn.h | 19 --------- net/mlvpn/files/patch-src_tuntap__bsd.c | 11 ------ 6 files changed, 24 insertions(+), 139 deletions(-) diff --git a/net/mlvpn/Makefile b/net/mlvpn/Makefile index 62d3e61b666e..c6879a971664 100644 --- a/net/mlvpn/Makefile +++ b/net/mlvpn/Makefile @@ -1,6 +1,5 @@ PORTNAME= mlvpn -PORTVERSION= 2.3.1 -PORTREVISION= 5 +PORTVERSION= 2.3.5 CATEGORIES= net net-vpn MAINTAINER= olivier@FreeBSD.org diff --git a/net/mlvpn/distinfo b/net/mlvpn/distinfo index bec3bc4d9e7c..e482868bc586 100644 --- a/net/mlvpn/distinfo +++ b/net/mlvpn/distinfo @@ -1,2 +1,3 @@ -SHA256 (zehome-MLVPN-2.3.1_GH0.tar.gz) = 4bbe8ae10ccad4ba764d29db0293b3ab523ded5d0a0b5adbe6a8d4d839e4138e -SIZE (zehome-MLVPN-2.3.1_GH0.tar.gz) = 83817 +TIMESTAMP = 1779527756 +SHA256 (zehome-MLVPN-2.3.5_GH0.tar.gz) = 015542819599d4ba0e53c0df642d6ccd2c7e88dff86e1fd6f157366582bdf825 +SIZE (zehome-MLVPN-2.3.5_GH0.tar.gz) = 88644 diff --git a/net/mlvpn/files/patch-src_config.c b/net/mlvpn/files/patch-src_config.c deleted file mode 100644 index 5b9b5d498dd0..000000000000 --- a/net/mlvpn/files/patch-src_config.c +++ /dev/null @@ -1,57 +0,0 @@ ---- src/config.c.orig 2015-12-28 11:20:16 UTC -+++ src/config.c -@@ -269,6 +269,7 @@ mlvpn_config(int config_file_fd, int fir - } else if (strncmp(lastSection, "filters", 7) != 0) { - char *bindaddr; - char *bindport; -+ uint32_t bindfib = 0; - char *dstaddr; - char *dstport; - uint32_t bwlimit = 0; -@@ -284,6 +285,9 @@ mlvpn_config(int config_file_fd, int fir - _conf_set_str_from_conf( - config, lastSection, "bindport", &bindport, NULL, - "bind port is mandatory in server mode.\n", 1); -+ _conf_set_uint_from_conf( -+ config, lastSection, "bindfib", &bindfib, 0, -+ NULL, 0); - _conf_set_str_from_conf( - config, lastSection, "remotehost", &dstaddr, NULL, - NULL, 0); -@@ -297,6 +301,9 @@ mlvpn_config(int config_file_fd, int fir - _conf_set_str_from_conf( - config, lastSection, "bindport", &bindport, NULL, - NULL, 0); -+ _conf_set_uint_from_conf( -+ config, lastSection, "bindfib", &bindfib, 0, -+ NULL, 0); - _conf_set_str_from_conf( - config, lastSection, "remotehost", &dstaddr, NULL, - "No remote address specified.\n", 1); -@@ -336,6 +343,7 @@ mlvpn_config(int config_file_fd, int fir - tmptun->name); - if ((! mystr_eq(tmptun->bindaddr, bindaddr)) || - (! mystr_eq(tmptun->bindport, bindport)) || -+ (tmptun->bindfib != bindfib) || - (! mystr_eq(tmptun->destaddr, dstaddr)) || - (! mystr_eq(tmptun->destport, dstport))) { - mlvpn_rtun_status_down(tmptun); -@@ -347,6 +355,9 @@ mlvpn_config(int config_file_fd, int fir - if (bindport) { - strlcpy(tmptun->bindport, bindport, sizeof(tmptun->bindport)); - } -+ if (tmptun->bindfib != bindfib) { -+ tmptun->bindfib = bindfib; -+ } - if (dstaddr) { - strlcpy(tmptun->destaddr, dstaddr, sizeof(tmptun->destaddr)); - } -@@ -380,7 +391,7 @@ mlvpn_config(int config_file_fd, int fir - { - log_info("config", "%s tunnel added", lastSection); - mlvpn_rtun_new( -- lastSection, bindaddr, bindport, dstaddr, dstport, -+ lastSection, bindaddr, bindport, bindfib, dstaddr, dstport, - default_server_mode, timeout, fallback_only, - bwlimit, loss_tolerence); - } diff --git a/net/mlvpn/files/patch-src_mlvpn.c b/net/mlvpn/files/patch-src_mlvpn.c index ad12663e6bf0..7222a8317ff8 100644 --- a/net/mlvpn/files/patch-src_mlvpn.c +++ b/net/mlvpn/files/patch-src_mlvpn.c @@ -1,54 +1,26 @@ ---- src/mlvpn.c.orig 2015-12-28 11:20:16 UTC +--- src/mlvpn.c.orig 2026-05-23 10:58:16 UTC +++ src/mlvpn.c -@@ -597,7 +597,7 @@ mlvpn_rtun_write(EV_P_ ev_io *w, int rev - - mlvpn_tunnel_t * - mlvpn_rtun_new(const char *name, -- const char *bindaddr, const char *bindport, -+ const char *bindaddr, const char *bindport, uint32_t bindfib, - const char *destaddr, const char *destport, - int server_mode, uint32_t timeout, - int fallback_only, uint32_t bandwidth, -@@ -653,6 +653,7 @@ mlvpn_rtun_new(const char *name, - strlcpy(new->bindaddr, bindaddr, sizeof(new->bindaddr)); - if (bindport) - strlcpy(new->bindport, bindport, sizeof(new->bindport)); -+ new->bindfib = bindfib; - if (destaddr) - strlcpy(new->destaddr, destaddr, sizeof(new->destaddr)); - if (destport) -@@ -780,6 +781,7 @@ static int - mlvpn_rtun_start(mlvpn_tunnel_t *t) - { - int ret, fd = -1; -+ int fib = 0; - char *addr, *port; - struct addrinfo hints, *res; - -@@ -788,9 +790,11 @@ mlvpn_rtun_start(mlvpn_tunnel_t *t) - { - addr = t->bindaddr; - port = t->bindport; -+ fib = t->bindfib; - } else { - addr = t->destaddr; - port = t->destport; -+ fib = t->bindfib; - } - - /* Initialize hints */ -@@ -817,6 +821,14 @@ mlvpn_rtun_start(mlvpn_tunnel_t *t) - log_warn(NULL, "%s socket creation error", +@@ -847,13 +847,17 @@ mlvpn_rtun_start(mlvpn_tunnel_t *t) t->name); } else { + /* Setting fib/routing-table is supported on FreeBSD and OpenBSD only */ +-#if defined(HAVE_FREEBSD) +- if (fib > 0 && setsockopt(fd, SOL_SOCKET, SO_SETFIB, &fib, sizeof(fib)) < 0) +-#elif defined(HAVE_OPENBSD) +- if (fib > 0 && setsockopt(fd, SOL_SOCKET, SO_RTABLE, &fib, sizeof(fib)) < 0) +#if defined(HAVE_FREEBSD) || defined(HAVE_OPENBSD) -+ /* Setting SO_SETFIB (fib) supported on FreeBSD and OpenBSD only */ -+ if (setsockopt(fd, SOL_SOCKET, SO_SETFIB, &fib, sizeof(fib)) < 0) -+ { -+ log_warnx(NULL, "Cannot set FIB %d for kernel socket", fib); -+ goto error; -+ } ++ if (fib > 0) + { +- log_warn(NULL, "Cannot set FIB %d for kernel socket", fib); +- goto error; ++#if defined(HAVE_FREEBSD) ++ if (setsockopt(fd, SOL_SOCKET, SO_SETFIB, &fib, sizeof(fib)) < 0) { ++#else ++ if (setsockopt(fd, SOL_SOCKET, SO_RTABLE, &fib, sizeof(fib)) < 0) { +#endif ++ log_warn(NULL, "Cannot set FIB %d for kernel socket", fib); ++ goto error; ++ } + } + #endif t->fd = fd; - break; - } diff --git a/net/mlvpn/files/patch-src_mlvpn.h b/net/mlvpn/files/patch-src_mlvpn.h deleted file mode 100644 index cb2364b507fc..000000000000 --- a/net/mlvpn/files/patch-src_mlvpn.h +++ /dev/null @@ -1,19 +0,0 @@ ---- src/mlvpn.h.orig 2015-12-28 11:20:16 UTC -+++ src/mlvpn.h -@@ -138,6 +138,7 @@ typedef struct mlvpn_tunnel_s - char *name; /* tunnel name */ - char bindaddr[MLVPN_MAXHNAMSTR]; /* packets source */ - char bindport[MLVPN_MAXPORTSTR]; /* packets port source (or NULL) */ -+ uint32_t bindfib; /* FIB number to use */ - char destaddr[MLVPN_MAXHNAMSTR]; /* remote server ip (can be hostname) */ - char destport[MLVPN_MAXPORTSTR]; /* remote server port */ - int fd; /* socket file descriptor */ -@@ -193,7 +194,7 @@ int mlvpn_rtun_wrr_reset(struct rtunhead - mlvpn_tunnel_t *mlvpn_rtun_wrr_choose(); - mlvpn_tunnel_t *mlvpn_rtun_choose(); - mlvpn_tunnel_t *mlvpn_rtun_new(const char *name, -- const char *bindaddr, const char *bindport, -+ const char *bindaddr, const char *bindport, uint32_t bindfib, - const char *destaddr, const char *destport, - int server_mode, uint32_t timeout, - int fallback_only, uint32_t bandwidth, diff --git a/net/mlvpn/files/patch-src_tuntap__bsd.c b/net/mlvpn/files/patch-src_tuntap__bsd.c deleted file mode 100644 index 4d2fc1235258..000000000000 --- a/net/mlvpn/files/patch-src_tuntap__bsd.c +++ /dev/null @@ -1,11 +0,0 @@ ---- src/tuntap_bsd.c.orig 2015-12-28 11:20:16 UTC -+++ src/tuntap_bsd.c -@@ -21,7 +21,7 @@ mlvpn_tuntap_read(struct tuntap_s *tunta - mlvpn_tunnel_t *rtun = NULL; - mlvpn_pkt_t *pkt; - ssize_t ret; -- u_char data[DEFAULT_MTU] -+ u_char data[DEFAULT_MTU]; - struct iovec iov[2]; - uint32_t type; -home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a156e6d.32a78.1a87031>
