Commit graph

1674 commits

Author SHA1 Message Date
Elyes Haouas 67db7b43d0 ppp: Use nitems(foo) instead of sizeof(foo)/sizeof(foo[0])
Pull Request: https://github.com/freebsd/freebsd-src/pull/888
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
2024-04-28 21:30:55 -06:00
Elyes Haouas ec8a394d9c usr.sbin: Remove repeated words
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/887
2024-04-11 11:53:37 -06:00
Warner Losh 4d65a7c695 usr.sbin: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by:		Netflix
2023-11-26 22:24:01 -07:00
Warner Losh 8a7b612037 usr.sbin: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by:		Netflix
2023-11-26 22:23:56 -07:00
Warner Losh 05248206f7 Remove $FreeBSD$: one-line bare tag
Remove /^\s*\$FreeBSD\$$\n/
2023-08-16 11:55:20 -06:00
Warner Losh fa9896e082 Remove $FreeBSD$: two-line nroff pattern
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
2023-08-16 11:55:10 -06:00
Warner Losh d0b2dbfa0e Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:55:03 -06:00
Warner Losh 1d386b48a5 Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
2023-08-16 11:54:42 -06:00
Warner Losh b3e7694832 Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
2023-08-16 11:54:16 -06:00
Pierre Pronchery 96e6e5b5fe ppp: specify OpenSSL 1.1 APIs
OPENSSL_API_COMPAT can be used to specify the OpenSSL API version in
use for the purpose of hiding deprecated interfaces and enabling
the appropriate deprecation notices.

This change is a NFC while we're still using OpenSSL 1.1.1 but will
avoid deprecation warnings upon the switch to OpenSSL 3.0.

A future change should migrate to use the OpenSSL 3.0 APIs.

PR:		271615
Reviewed by:	emaste
Event:		Kitchener-Waterloo Hackathon 202305
Sponsored by:	The FreeBSD Foundation
2023-05-24 14:55:07 -04:00
Warner Losh 4d846d260e spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix
2023-05-12 10:44:03 -06:00
John Baldwin 672eba2435 ppp: Use valid prototypes for function declarations with no arguments.
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D39730
2023-04-24 08:53:49 -07:00
Simon J. Gerraty d9a4274795 Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
Elyes Haouas 44357c18cc ppp: Remove trailing semicolon
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/654
2023-03-14 20:39:34 -06:00
Michael Tuexen cef3c4e0ba ppp: improve MSS clamping
ppp supports MSS clamping for TCP/IPv4. This patch
* improves MSS clamping for TCP/IPv4 by using the MSS as specified
  in RFC 6691.
* adds support for MSS clamping for TCP/IPv6.

Reported by:		Timo Voelker
Reviewed by:		thj
MFC after:		1 week
Differential Revision:	https://reviews.freebsd.org/D37624
2022-12-08 09:48:29 +01:00
Fernando Apesteguía 4a3c598f35 Bump .Dd for recently modified manual pages
During the removal of named(8) references, some pages were modified but their
.Dd where not updated accordingly.

Reported by:	lwhsu@
Fixes:	942e234d86
2022-06-27 18:20:03 +02:00
Fernando Apesteguía 942e234d86 Remove references to named(8)
named(8) hasn't been in base for some time. Remove all references to it in
manual pages.

Approved by:	manpages (Pau Amma)
Differential Revision:	https://reviews.freebsd.org/D35586
2022-06-26 18:53:08 +02:00
Ceri Davies c1a148873d sys/*/conf/*, docs: fix links to handbook
While here, fix all links to older en_US.ISO8859-1 documentation
in the src/ tree.

PR:             255026
Reported by:    Michael Büker <freebsd@michael-bueker.de>
Reviewed by:    dbaio
Approved by:    blackend (mentor), re (gjb)
MFC after:      10 days
Differential Revision: https://reviews.freebsd.org/D30265
2021-05-20 09:27:10 +01:00
Emmanuel Vadot a22cde7c02 pkgbase: Put ppp in it's own package
ppp uses libalias modules which now belong in the natd package.
Avoid bringing a dependancy on natd for the utilities package.

Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D27711
2021-01-04 16:19:36 +01:00
Allan Jude 9d4c84dea4 ppp: Document the fact that ppp_nat is enabled by default
No functional change.

PR:		243062
Submitted by:	Evilham <contact@evilham.com> (original version)
MFC after:	2 weeks
Sponsored by:	Klara Inc.
Event:		July 2020 Bugathon
Differential Revision:	https://reviews.freebsd.org/D25623
2020-07-11 18:24:16 +00:00
Warner Losh 6ee8575cd7 Remove all the RELEASE_CRUNCH defines, they are useless.
RELEASE_CRUNCH has been broken for a very long time. Remove the
last remants from the tree.
2019-12-16 21:06:24 +00:00
Warner Losh 28c8ec2f7e Retire the -DRELEASE_CRUNCH define.
The RELEASE_CRUNCH ifdefs save about 100 bytes of text space. The
complexity is not worth it as they eliminate error messages.

Left the RELEASE_CRUNCH ifdef to eliminate a lot of stuff in place.
That saves an interesting amount of space and change some behaviors,
so absent a more detailed analysis, maintain the status quo.
2019-07-12 06:19:25 +00:00
Jung-uk Kim 16e2656210 Make ppp(8) buildable. 2018-09-19 07:09:55 +00:00
Edward Tomasz Napierala 94df44ee6c Add u3g ppp.conf entry. It provides some starting point to making
use of u3g(4) dongles, and in many cases can work out of the box.

Reviewed by:	hselasky
Approved by:	re (gjb)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D16974
2018-09-11 17:05:26 +00:00
Nick Hibma f80b39d182 Add the possibility to mark packets urgent based on their length.
This allows preferring small (e.g. ACK) packets, in upload heavy
environments.

It was already possible to mark packets urgent based on destination
port. This option piggy backs on that feature.
2018-08-17 10:18:45 +00:00
Eugene Grosbein 6cd3353ba3 ppp(8): fix code producing debugging logs
Fix several cases when long buffer is copied to shorter one
using snprintf that results in contents truncation and
clobbering unsaved errno value and creation of misleading logs.

PR:		218517
Approved by:	avg (mentor)
MFC after:	1 month
2018-02-10 17:09:51 +00:00
Pedro F. Giffuni 9b10f59a10 SPDX: mostly fixes to previous changes.
Introduce the recently approved BSD-1-Clause and replace 0BSD which
never did fit well our use cases.
2017-12-13 16:13:17 +00:00
Pedro F. Giffuni 8820ecc040 SPDX: Fix some cases wrongly attributed to MIT.
In the cases of BSD-style license variants without clauses, use 0BSD for
the time being in lack of a better description.
2017-11-30 15:10:11 +00:00
Pedro F. Giffuni 1de7b4b805 various: general adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

No functional change intended.
2017-11-27 15:37:16 +00:00
Pedro F. Giffuni 8a16b7a18f General further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
2017-11-20 19:49:47 +00:00
Bryan Drewery ea825d0274 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +00:00
Eugene Grosbein 81a5dbd52c ppp(8): style(9) fix after r325157
Approved by:	mav (mentor)
2017-10-30 15:19:28 +00:00
Eugene Grosbein 538abeb18d Fix ppp(8) to add RTF_HOST flag to created host route.
Reported by:	Mike Tancsa <mike@sentex.net>
Approved by:	avg (mentor)
MFC After:	1 week
2017-10-30 15:02:42 +00:00
Eitan Adler a2aef24aa3 Update several more URLs
- Primarily http -> https
- Primarily FreeBSD project URLs
2017-10-29 08:17:03 +00:00
Conrad Meyer af3b49ef41 ppp(8): Fix various bugs in NOPAM section of auth_CheckPasswd
* pw is not initialized before use
* success is returned if crypt(3) errors

These bugs were introduced in r231994, which attempted to adopt DragonflyBSD
f4a9869feb646aafe72de6e5d61051a023a02676.  The original author of the
Dragonfly change also noticed these mistakes and filed the PR.

PR:		222620
Submitted by:	Lubos Boucek <bouceklubos AT gmail.com>
Obtained from:	DragonflyBSD f4a9869feb646aafe72de6e5d61051a023a02676
2017-10-02 23:14:29 +00:00
Stephen J. Kiernan ba01ab64cc Before returning because of an memory allocation error, free the memory
already allocated to buf.

Found using clang's static analyzer - scan-build

Submitted by:	Thomas Rix <trix@juniper.net>
Reviewed by:	stevek
Approved by:	sjg (mentor)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D9852
2017-06-06 21:51:04 +00:00
Brooks Davis a7dc31283a Remove the NATM framework including the en(4), fatm(4), hatm(4), and
patm(4) devices.

Maintaining an address family and framework has real costs when we make
infrastructure improvements.  In the case of NATM we support no devices
manufactured in the last 20 years and some will not even work in modern
motherboards (some newer devices that patm(4) could be updated to
support apparently exist, but we do not currently have support).

With this change, support remains for some netgraph modules that don't
require NATM support code. It is unclear if all these should remain,
though ng_atmllc certainly stands alone.

Note well: FreeBSD 11 supports NATM and will continue to do so until at
least September 30, 2021.  Improvements to the code in FreeBSD 11 are
certainly welcome.

Reviewed by:	philip
Approved by:	harti
2017-04-24 21:21:49 +00:00
Sevan Janiyan 56e4d8d5f6 ftp.microsoft.com is dead and the document was not archived, point to the full
protocol spec document instead.
Fix spelling mistake flagged by igor.
Rephrase bad sentence flagged by igor.

Approved by:	bcr (mentor)
MFC after:	5 days
Differential Revision:	 https://reviews.freebsd.org/D10111
2017-03-25 21:33:48 +00:00
Baptiste Daroussin 7059692f3a Fix build of ppp when WITHOUT_PAM is set
PR:		210658
Reported by:	madpilot
Tested by:	madpilot
Approved by:	re@ (kib)
2016-07-04 21:18:57 +00:00
Glen Barber ea580d0b45 Revert r301137 and r301163, and implement a correct fix
for the CONFS issue with dma.conf and ppp.conf.

Thank you very much to Bryan Drewery for looking into the
problem and providing this fix.

Pointyhat:	gjb
Sponsored by:	The FreeBSD Foundation
2016-06-01 20:44:28 +00:00
Glen Barber efe50fa18a Revert r289096:
Files listed in 'CONFS' are not properly included in new
installations (missing from base.txz), for reasons I still
do not fully understand.

This reverts the change excluding /etc/ppp/ppp.conf from
a new installation.  /etc/dma/dma.conf is also affected,
but requires a different solution, still being investigated.

Reported by:	Ben Woods
Sponsored by:	The FreeBSD Foundation
2016-06-01 16:45:08 +00:00
Don Lewis 647bedd5da Don't walk off the end of the array when proto isn't explicitly
listed above.  Instead update the catch-all "Others" bucket.

Reported by:	Coverity
CID:		1007571, 1007572
MFC after:	1 week
2016-05-16 23:47:08 +00:00
Pedro F. Giffuni 80c7cc1c8f Cleanup unnecessary semicolons from utilities we all love. 2016-04-15 22:31:22 +00:00
Marcelo Araujo 71866e627e Use NULL instead of 0 for pointers.
getenv(3) returns NULL if the variable name is not in the current
environment.
getservent(3) returns NULL on EOF or error

MFC after:	4 weeks
2016-04-15 03:50:33 +00:00
Eitan Adler 463a577b27 Fix a ton of speelling errors
arc lint is helpful

Reviewed By: allanjude, wblock, #manpages, chris@bsdjunk.com
Differential Revision: https://reviews.freebsd.org/D3337
2015-10-21 05:37:09 +00:00
Baptiste Daroussin f98f68bd50 Use existing CONFDIR instead of adding a new CONFIGDIR
Reported by:	jbeich
2015-10-11 19:25:39 +00:00
Baptiste Daroussin 2c9976e37e Install bsd.confs.mk
Rename ETCDIR into CONFIGDIR to avoid conflicts with the ports tree
2015-10-10 10:48:09 +00:00
Baptiste Daroussin 23c7816115 Move ppp.conf into the ppp sources 2015-10-09 23:57:07 +00:00
Simon J. Gerraty ccfb965433 Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
Simon J. Gerraty 44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00