-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mlvpn: Add package (Multi-Link Virtual Public Network) #4271
Conversation
Please assign copyright to yourself and/or omit it. Change gz to xz and add PKG_MIRROR_HASH. |
381e038
to
b34d2a9
Compare
All done. Please check the amended commit. |
@hnyman |
The sysupgrade code is copied from openvpn package, see OpenWRT openvpn package and LEDE openvpn package |
net/mlvpn/Makefile
Outdated
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mlvpn $(1)/usr/sbin/ | ||
install -m0700 files/mlvpn-updown $(1)/usr/sbin/ | ||
$(INSTALL_BIN) files/mlvpn.init $(1)/etc/init.d/mlvpn | ||
$(INSTALL_DATA) files/mlvpn.upgrade $(1)/lib/upgrade/keep.d/mlvpn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add this instead manually adding the file to /lib/upgrade/keep.d/mlvpn please:
define Package/mlvpn/conffiles
/etc/mlvpn/
endef
It will have the same effect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Will this be merged soon? How about LEDE? |
Hi, I have build this package for LEDE x86_64 (running on KVM). I use it as a client, but I have a bug when I try to bind a tunnel to an interface address with the "bindhost" option. Without this option, all works fine. When I try mlvpn on Debian 9, all works fine with the same configuration file. Here are the output of his command:
The command ends after the last line. When I read the log, I can see a segfault: I saw you have already added a patch for musl compatibility... Here is the config file:
Thank you. |
regarding this error it happens in the trunk version which uses the last linux kernel, try to use Chaos Calmer and the segfault will go away, and please, share your configs and setup if you have a successful run |
Does it still segfault on a recent version (master) of OpenWrt? |
sorry, i did not check it for months but it should, because there was no commits since then |
ping @azuwis If you want this in, please rebase against current master |
@Stratehm @savalyksergey Sorry for the late replay. I've no idea about the segfault. The musl patch was a trivial one. @neheb I've rebased and force-pushed, also updated mlvpn to 2.3.2. Compile tested, but not run tested. I don't use mlvpn any longer, so I'd like to leave it here for anyone interested to continue the work. |
Interestingly enough, there's a version 2.3.3 as part of the debian-stretch branch. |
It seems 2.3.3 is only for Debian packaging, |
net/mlvpn/Makefile
Outdated
|
||
PKG_SOURCE_PROTO:=git | ||
PKG_SOURCE_URL:=https://github.com/zehome/MLVPN.git | ||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is implicit. Remove.
net/mlvpn/Makefile
Outdated
PKG_SOURCE_URL:=https://github.com/zehome/MLVPN.git | ||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) | ||
PKG_SOURCE_VERSION:=6f13423b8108f46edb9f230deee20e3741abe64c | ||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is implicit. Remove.
net/mlvpn/Makefile
Outdated
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz | ||
PKG_MIRROR_HASH:=e77916143162ffa050bc07482264f726b0c03a8fa9e07bb594a3759f512830cd | ||
|
||
PKG_LICENSE:=BSD-2-Clause |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Swap order between PKG_LICENSE and PKG_MAINTAINER.
Add PKG_LICENSE_FILES:=LICENCE
net/mlvpn/files/mlvpn-updown
Outdated
{ | ||
if [ "$unamestr" = "Linux" ]; then | ||
ip link set dev "$DEVICE" mtu "$MTU" up | ||
if [ ! -z "$IP4" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shellcheck throws numerous instances of:
SC2236: Use -n instead of ! -z.
net/mlvpn/files/mlvpn-updown
Outdated
via="" | ||
if [ "$family" = "4" ]; then | ||
[ -z "$IP4_GATEWAY" ] || via="via $IP4_GATEWAY" | ||
ip -4 route add "$route" $via dev "$DEVICE" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shellcheck says $via should be quoted.
net/mlvpn/files/mlvpn-updown
Outdated
ip -4 route add "$route" $via dev "$DEVICE" | ||
elif [ "$family" = "6" ]; then | ||
[ -z "$IP6_GATEWAY" ] || via="via $IP6_GATEWAY" | ||
ip -6 route add "$route" $via dev "$DEVICE" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shellcheck says $via should be quoted.
Signed-off-by: Zhong Jianxin <azuwis@gmail.com>
# This is free software, licensed under the GNU General Public License v2. | ||
# See /LICENSE for more information. | ||
# | ||
include $(TOPDIR)/rules.mk |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
include $(TOPDIR)/rules.mk | |
include $(TOPDIR)/rules.mk |
PKG_FIXUP:=autoreconf | ||
PKG_BUILD_PARALLEL:=1 | ||
|
||
include $(INCLUDE_DIR)/package.mk |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
include $(INCLUDE_DIR)/package.mk | |
include $(INCLUDE_DIR)/package.mk |
|
||
include $(INCLUDE_DIR)/package.mk | ||
|
||
define Package/mlvpn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
define Package/mlvpn | |
define Package/mlvpn |
We have plenty of VPNs already |
Going to close this. There doesn't seem to be anyone interested. |
This is not yet another VPN, it's mainly used for aggregation. |
Tuning in here for interest. I'd love to see MLVPN on upstream. |
I wanted to see if this would happen on Referring from markfoodyburton/ubond#7
paging @azuwis @markfoodyburton @zehome |
While MLVPN and Ubond 'diverged' somewhat significantly, I'm afraid much of the boilerplate remains the same, so it's likely that both will suffer the same issues with devices - however, millage may differ. (Ubond tries to do a few things that MLVPN does not - it tries to load balance better, and it tries to 'auto adjust' to speeds - it also tries to reduce packet loss on noisy channels, and it tries to fail-over seamlessly. All good, the bad is that "it works for me", parts of the support for different things that MLVPN had, are just 'left dangling' and probably broken in ubond - YMMV) |
Maintainer: me / @azuwis
Compile tested: (ramips/mt7621, ZBT-WG3526, LEDE r3972)
Run tested: (ramips/mt7621, ZBT-WG3526, LEDE r3972, tests done)
Description:
mlvpn is Multi-Link Virtual Public Network, MLVPN will do its best to achieve the following tasks:
See mlvpn homepage for more info.