net/mpd5: retry resolving of peer name
Import r2539 from upstream: if L2TP, PPtTP, TCP or UDP peer
specified with domain name and its resolving fails,
retry until success even for default case of "resolve-once" more.
Bump PORTREVISION for this bugfix.
*/*: convert Makefile patches to MAKE_ARGS after "Move man pages to share/man"
Replaced patches for Makefiles with "MAKE_ARGS+=MANDIR=${PREFIX}/share/man"
Reported by: danfe, mat
Approved by: portmgr (blanket)
net/mpd5: minor improvements
(1) Import r2512 and r2529 from upstream:
* optimize CCP logging a bit: no string copying for known CCP names;
* use right name for HP-PPC.
Bump PORTREVISION.
(2) Also, this commit fixes upgrade problem for package users
introduced with previous commit that removed USES=ssl
not bumping PORTREVISION and following rename of openssl package
to openssl111. For details, refer to:
https://github.com/opnsense/core/issues/6959
PR: 274748 (2)
Reported by: Franco Fichtner (2)
Fixes: 87e2681289fc1eb5fda22e4072aca1e7943af25e
net/mpd5: remove USES=ssl
mpd5 forces usage of base system crypto libraries
despite of presence of other *SSL libraries, so USES=ssl is wrong here.
The change does not affect build, so PORTREVISION not bumped.
PR: 273970
net/mpd5: new small feature and bugfix
- Import r2539 from upstream: introduce new interface description conversion
specification %s for last description change time, in unixtime (seconds).
- Unbreak SIGUSR1/SIGUSR2 mechanics to open/close first link broken
in mpd5-5.9_10 (*)
PR: 271508 (*)
net/mpd5: undo regression for specific PPPoE peers
mpd5-5.9_14 introduced regression for specific case
when no mtu configured for PPPoE peer that does not advertize any MTU itself.
mpd5 should default to 1492 then but revision 14 defaults to 1500.
The problem may be worked around specifying 1492 for link or interface MTU
until upgrade to this revision that restores compatibility.
PR: 270687
net/mpd5: minor improvements
Import several improvement from upstream:
* r2408,2409 - use SOCK_CLOEXEC for all sockets including PPtP,
web and telnet consoles, so that subprocesses like ip-up/down scripts
do not inherit such sockets;
* r2415 - avoid inadequate MTU undervalueing when bundle compression
and/or encryption configured but not negotiated;
f.e. PPPoE interface MTU could be set to 1490 instead of 1492 previously;
* r2482,2483 - improve client-side implementation of PPP-Max-Payload (RFC4638)
and do not limit "set pppoe max-payload {size}" to 1510
but use MTU of parent interface minus 8, as per RFC;
also, relax sanity check for "set link mtu/mru" in case of PPPoE,
so that it is possible to configure values like 1500 and over, if needed.
net/mpd5: eliminate some build time warnings
Import a couple of patches from upstream to eliminate some Clang warnings.
PORTREVISION not changed intentionally as changes are cosmetic.
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: do not use negative value for socket backlog
Import r2463 from upstream.
As per POSIX, supply INT_MAX for listen(2) to use system default.
This changed in preparation for FreeBSD 14.
See also: https://reviews.freebsd.org/D31821
net/mpd5: fix some LCP negotiation problems
* Import upstream r2453: prevent endless LCP restarts in case of broken
peer or heavy packet drops. Allow 3 restarts then terminate LCP.
Let link redial restart it from the beginning, if configured.
* Import upstream r2454: fixes long-standing bug
known as "LCP: not converging" problem leaving link closed
with erroneously disabled redial.
Remove WWW entries moved into port Makefiles
Commit b7f05445c00f has added WWW entries to port Makefiles based on
WWW: lines in pkg-descr files.
This commit removes the WWW: lines of moved-over URLs from these
pkg-descr files.
Approved by: portmgr (tcberner)
Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.
Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.
There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.
This commit implements such a proposal and moves one of the WWW: entries
of each pkg-descr file into the respective port's Makefile. A heuristic
attempts to identify the most relevant URL in case there is more than
one WWW: entry in some pkg-descr file. URLs that are not moved into the
Makefile are prefixed with "See also:" instead of "WWW:" in the pkg-descr
files in order to preserve them.
There are 1256 ports that had no WWW: entries in pkg-descr files. These
ports will not be touched in this commit.
The portlint port has been adjusted to expect a WWW entry in each port
Makefile, and to flag any remaining "WWW:" lines in pkg-descr files as
deprecated.
Approved by: portmgr (tcberner)
net/mpd5: install dictionary.mpd and add fix r2441 from upstream
* Add dictionary.mpd to default package build and install it
to /usr/local/share/mpd/dictionary.mpd.
Thanks Dmitry Luhtionov who noted this omission.
* If parent interface of PPPoE link (vlan, detachable USB ethernet etc.)
got destroyed and re-added, detect that and continue automatically;
manual interference was required before this import of upstream r2441.
net/mpd5: Use @sample for sample configuration files
The port installs some ".sample" configuration files into etc. Let's use
the @sample keyword to manage them correctly during upgrades and
deinstallations.
Approved by: portmgr blanket
net/mpd5: let "red-port" accept zero remote port value
Import upstream r2446: allow to configre "any" remote port
for port redirection rule as supported by libalias(3).
PR: 261802
Reported by: Martin Birgmeier
net/mpd5: Re-implement improvement for multi-homed L2TP server
Import upstream r2437-r2440:
Use IP_RECVDSTADDR socket option for IPv4 L2TP server
with unspecified self address (0.0.0.0) to determine destination
IP address of incoming request and bind new tunnel to right address.
This unbreaks multihomed L2TP server setup.
net/mpd5: undo recent change for L2TP server.
Temporary remove a change to L2TP server introduced after mpd5-5.9_2
(an attempt to improve multi-homed server behavior)
because of discovered bug that can result in a hang of the process.
Fixed version will be added later after more testing.
Reported by: Eugene Selin at SourceForge
net/mpd5: unbreak multihomed L2TP server setup and add WITHOUT_RADIUS
This change adds two improvements from upstream:
* Use IP_RECVDSTADDR socket option for IPv4 L2TP server
with unspecified self address (0.0.0.0) to determine destination
IP address of incoming request and bind new tunnel to right address.
This unbreaks multihomed L2TP server setup. (r2419)
* Add support for base system built without libradius
(WITHOUT_RADIUS_SUPPORT): this includes auto-detecting
libradius presence and force building without RADIUS support.
Default build is not affected and enables RADIUS support. (r2424)
net/mpd5: fix PPPoE Server remotely exploitable crash
This is security fix for PPPoE servers.
Insufficient validation of incoming PPPoE Discovery request
specially crafted by unauthenticated user might lead to unexpected
termination of the process. The problem affects mpd versions since 5.0.
Installations not using PPPoE server configuration were not affected.
Reported by: paul & Yannick C at SourceForge
Tested by: paul & Yannick C at SourceForge
Security: f55921aa-10c9-11ec-8647-00e0670f2660
net/mpd5: add L2TP fix from upstream (r2410, r2411).
This change should fix the problem reported in bugs #38 #47 #74.
It is L2TP interoperability issue with some Juniper, Cisco and
YAMAHA RTX routers having strict protocol checks.
Move USES to pet portlint.
Reported by: Kikuchan at SourceForge (based on)
net/mpd5: update to version 5.9
This version contains security fix for L2TP clients and servers.
Insufficient validation of incoming L2TP control packet
specially crafted by unauthenticated user might lead to unexpected
termination of the process. The problem affects mpd versions
since 4.0 that brought in initial support for L2TP.
Other changes from upstream were already present in the port
in form of pathes that were removed with this update.
Reported by: chennan at SourceForge
Reviewed by: mav
net/mpd5: remove required_files from startup script
Name and/or location of the configuration file may be changed
with mpd_flags, in which case required_files prevents starting service.
It is no big deal if mpd5 started with missing configuration file
because it just prints a warning to the log and exits in that case.
PR: 248993
net/mpd5: improve logging in rare case of libpdel failure.
Import upstream r2329 and r2373 to direct assertion message to the log.
See also: https://sourceforge.net/p/mpd/bugs/68/
net/mpd5: import r2272 from upstream
This fixes build with -fno-common (clang 11 and gcc 10).
PORTREVISION not bumped as it fixes build for FreeBSD 13.
PR: 248741
Reported by: dim
Fix build with src r354909 applied.
The referenced change made NO_INSTALLLIB, NO_MAN, and NO_PROFILE into
errors causing these ports that declare them and use the FreeBSD make
infrastructure as part of their build to fail.
When the offending variables occur in a BSD Makefile, NO_MAN becomes
MAN= and NO_INSTALLLIB and NO_PROFILE become MK_INSTALLLIB=no and
MK_PROFILE=no respectively. When declared in the environment they
become WITHOUT_<FOO>.
Clean up support for FreeBSD 11.2.
While here, modernize some comments in Mk/bsd.*.mk.
Note that graphics/drm-fbsd11.2-kmod is not renamed yet, this was somewhat
under discussion.
Submitted by: rene
Reviewed by: antoine, jbeich, mat, zeising
Differential Revision: https://reviews.freebsd.org/D21974
net/mpd5: remove BROKEN_SSL*
For now, BROKERNL_SSL* is designed for port that defines GNU_CONFIGURE
and USES=pkgconfig to get libssl's include and library paths by means
of pkg-config --cflags/--libs or just use CFLAGS etc. including ${LOCALBASE}
net/mpd5 does not use pkgconfig nor GNU configure and since last update
it forces usage of system libssl despite of presence of other *SSL packages,
so BROKEN_SSL* is unneeded and does only harm here.
net/mpd5: fix build for systems having libressl installed
Import upstream revisions r2258-r2260: do not use -I${LOCALBASE}/include
by default when option NG_IPACCT is off. If NG_IPACCT is on,
use -nostdinc to force needed header inclusion order to force
usage of base system libssl.
Bump PORTREVISION as package can change if built with default options
when net-mgmt/ng_ipacct is installed.
PR: 233471
net/mpd5: fix after incorrect change r484599
openssl-1.1.1 is in FreeBSD12 base system and that was already
resolved in r482627.
While here, explicitly mark the port incompatible with alternative SSL
libraries such as LibreSSL due to dependency of base system libfetch
that links with base system libssl.
PR: 233471
net/mpd5: make it possible to build with ssl=openssl111
Now as FreeBSD 12 got openssl-1.1.1 in base system and
/usr/include/openssl/ssl.h and /usr/local/include/openssl/ssl.h
are indentical, it is safe to allow building net/mpd5
with DEFAULT_VERSIONS having ssl=openssl111 and no reasons to break
the build.
However, resulting binary still links with base system /usr/lib/libssl.so
because of libfetch(3) needs it and mpd5 links with libfetch too.
net/mpd5: start service earlier
mpd5 daemon can be used as replacement for stock ppp(8) daemon
to provide global connectivity (PPPoE, mobile networks etc.)
Follow ppp(8) behavior and run startup script early before
NETWORKING (and netwait), so other services that require
working networking to be operational before starting won't fail.
Bump PORTREVISION.
net/mpd5: mark broken with openssl111 for a moment
mpd5 successfully compiles with openssl-devel or openssl111
but cannot be linked because it links with base system libfetch(3)
that currently links with /usr/lib/libssl.so.8 (openssl 1.0.2p-freebsd).
So, one should not attempt to build mpd5 with newer openssl version
until it's imported to base system so mpd5 won't link with two distinct
openssl versions.
PR: 231599
net/mpd5: revert previous LCP MRU negotiation change and add new way to deal with same problem following upstream changes r22478, r2249:
- reverse r2246 as it used wrong way to deal with the problem;
- make it possible to override results of LCP negotiation
and set interface MTU to specified value with a command:
set iface mtu NNN override
New option "override" is not documented yet.
This is dangerous option as it can violate RFC 1661
and should be used with caution and at your own risk.
It is useful when you deal with broken PPP peer
negotiating too low value while higher MTU is known to work.
net/mpd5: add a fix from upstream r2247
Prevent reporting wrong traffic accounting data in very rare case
of failure of netgraph statistical socket data flow.
Minor change for net/mpd5: improve LCP MRU negotiation.
Add a fix from upstream r2246:
Fix bug #62: improve LCP MRU negotiation in some unusual cases
sometimes happening while using Orange S.A. services.
This allow us to setup PPPoE client connection interface using mtu=1492
instead of 1456.
Reported by: Xavier Lemaire
Tested by: Xavier Lemaire