aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/ppp
Commit message (Collapse)AuthorAgeFilesLines
* ppp: Fix address leaksMark Johnston2026-09-165-18/+20
| | | | | | | | | | | | | | | Avoid printing timer addresses, so as to not divulge information about the address space layout. In ip.c, print the actual SPI instead of a pointer to the SPI in the header buffer. When debug logging is enabled, don't leak pointers when logging function arguments or return values. Reported by: Reo Shiseki MFC after: 2 weeks Sponsored by: The FreeBSD Foundation
* ppp: Fix a buffer overflow in the endpoint discriminator set commandMark Johnston2026-08-241-3/+8
| | | | | | | Reported by: Reo Shiseki MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D59054
* ppp: Avoid overflow when formatting endpoint discriminator optionsMark Johnston2026-08-031-6/+6
| | | | | | | | | | | | | Each byte of the address is represented by a pair of characters, so we should be multiplying len by 2 when figuring out how much buffer space we have. Previously, a sufficiently large option could cause an overflow of the global "result" buffer. Reported by: Joshua Rogers <joshua@joshua.hu> Tested by: Décio Brandão (0xDBJ) MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D58555
* ppp: Reject invalid endpoint discriminator optionsMark Johnston2026-07-311-0/+6
| | | | | | | | | | | | | | Per RFC1717 section 5.1.3, the option length must be at least three. Processing an undersized option would trigger a large out-of-bounds write. PR: 271910 Reported by: Robert Morris Reported by: Décio Brandão (0xDBJ) Reviewed by: emaste MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D58554
* ppp: Reject FSM messages whose length is smaller than the message headerJohn Baldwin2026-06-101-0/+6
| | | | | | | PR: 271843 Reported by: Robert Morris <rtm@lcs.mit.edu> Reviewed by: des, emaste Differential Revision: https://reviews.freebsd.org/D57139
* ppp: Permit CHAP challenges up to 255 bytesJohn Baldwin2026-06-103-5/+5
| | | | | | | | | | | | | | | RFC 1994 does not place any limit on the length of the value field in challenge messages except that the length is a single octet which bounds the maximum length to 255. NB: I'm not sure why the local[] and peer[] arrays contain room for an authentication name (AUTHLEN) in addition to a challenge value/response, but I've just left that in place. PR: 271955 Reported by: Robert Morris <rtm@lcs.mit.edu> Reviewed by: des Differential Revision: https://reviews.freebsd.org/D57138
* ppp: Don't fetch a non-existent variadic argumentJohn Baldwin2026-06-101-1/+4
| | | | | | | | | | | Only fetch the optional mode argument to ID0open to pass to open(2) if O_CREAT is present in the flags argument. It is UB to fetch an argument that doesn't exist. On CHERI this UB results in a fault. Reviewed by: brooks Obtained from: CheriBSD Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D57137
* SPDX: Tag BSD-4.3TAHOEAlexander Ziaee2025-05-211-1/+1
| | | | | | | | | | | | | | TIL traceroute.8 has one of the oldest liceses, predating BSD-4-Clause! The SPDX tag was not even on Wikipedia. These are all the files I could find in the tree with git grep that look like the license reported on the SPDX website, including one that was misfiled. Ref: https://spdx.org/licenses/BSD-4.3TAHOE.html MFC after: 3 days Reported by: brooks Reviewed by: brooks, carlavilla, imp, ivy Approved by: carlavilla (mentor) Differential Revision: https://reviews.freebsd.org/D50362
* man: Remove references to classful networksOlivier Cochard2025-02-041-3/+3
| | | | | | | | | Update wording in manual pages to replace references to classful networks with CIDR notation. Approved by: glebius, dhw Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D48853
* tcp: cleanup of nits after use of accessor tcp_get_flagsRichard Scheffenegger2024-12-191-3/+1
| | | | | | | | | | | | Remove unneeded th_x2 initalization, use named constants instead of magic numbers (fixing one oversight) and add some line breaks. Expand one man page slightly. No functional change intended. Reviewed By: tuexen, cc Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D48065
* ppp: Enable support for EIM NATDamjan Jovanovic2024-12-062-1/+25
| | | | | | | | Enable support for endpoint-independent mapping ("full cone NAT") via Libalias's UDP NAT. Reviewed by: igoro, thj Differential Revision: https://reviews.freebsd.org/D46689
* tcp: add TH_AE capabilities to ppp and pfRichard Scheffenegger2024-11-291-2/+2
| | | | | | | | | | Add support for the AE Flag in the TCP header to pf and ppp. Commonalize to the use of "E"(ECE), "W"(CWR) and "e"(AE) for the TCP header flags, in line with tcpdump. Reviewers: kp, cc, tuexen, cy, #transport! Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D47106
* tcp: extend the use of the th_flags accessor functionRichard Scheffenegger2024-11-293-16/+16
| | | | | | | | | | | Formally, there are 12 bits for TCP header flags. Use the accessor functions in more (kernel) places. No functional change. Reviewed By: cc, #transport, cy, glebius, #iflib, kbowling Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D47063
* ppp.8: Fix typo cuad0 -> cuau0Jose Luis Duran2024-11-191-19/+28
| | | | | | | | | | | | | | | | | | | | Fix a typo that was missed probably because it was capitalized. Mark up with .Pa and fix capitalization. Specify that cuaUX and cuauX are for USB and UART attachments respectively. - Silence most lint warnings - Update outdated links - Minor style fixes - Some igor(1) warnings were ignored on purpose PR: 248359 Reviewed by: imp, mhorne, Alexander Ziaee <concussious.bugzilla@runbox.com> Approved by: emaste (mentor) Fixes: 839f11a4fe18 ("A number of places in the source tree still reference cuad.* after sio(4) was deprecated by uart(4).") MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/1515
* usr.sbin/ppp: correct SIOCDIFADDR{,_IN6} calls to use {,in6_}ifreqKonrad Witaszczyk2024-07-221-36/+14
| | | | | | | | | | The SIOCDIFADDR{,_IN6} ioctls take an ifreq structure object, not an ifaliasreq structure object, as their argument. Reviewed by: brooks, jhb, oshogbo Approved by: oshogbo (mentor) Obtained from: CheriBSD Differential Revision: https://reviews.freebsd.org/D46018
* Remove residual blank line at start of MakefileWarner Losh2024-07-151-1/+0
| | | | | | | This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
* ppp: Use nitems(foo) instead of sizeof(foo)/sizeof(foo[0])Elyes Haouas2024-04-291-1/+3
| | | | | Pull Request: https://github.com/freebsd/freebsd-src/pull/888 Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
* usr.sbin: Remove repeated wordsElyes Haouas2024-04-111-1/+1
| | | | | | Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/887
* usr.sbin: Automated cleanup of cdefs and other formattingWarner Losh2023-11-271-1/+0
| | | | | | | | | | | | | | | | 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
* usr.sbin: Remove ancient SCCS tags.Warner Losh2023-11-271-2/+0
| | | | | | | | 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
* Remove $FreeBSD$: one-line bare tagWarner Losh2023-08-162-4/+0
| | | | Remove /^\s*\$FreeBSD\$$\n/
* Remove $FreeBSD$: two-line nroff patternWarner Losh2023-08-161-2/+0
| | | | Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-163-3/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-161-2/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-16119-238/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* ppp: specify OpenSSL 1.1 APIsPierre Pronchery2023-05-241-0/+1
| | | | | | | | | | | | | | | | 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
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-12115-115/+115
| | | | | | | | | 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
* ppp: Use valid prototypes for function declarations with no arguments.John Baldwin2023-04-248-12/+12
| | | | | Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D39730
* Update/fix Makefile.depend for userlandSimon J. Gerraty2023-04-191-1/+0
|
* ppp: Remove trailing semicolonElyes Haouas2023-03-151-2/+2
| | | | | | Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/654
* ppp: improve MSS clampingMichael Tuexen2022-12-081-14/+62
| | | | | | | | | | | | 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
* Bump .Dd for recently modified manual pagesFernando Apesteguía2022-06-271-1/+1
| | | | | | | | During the removal of named(8) references, some pages were modified but their .Dd where not updated accordingly. Reported by: lwhsu@ Fixes: 942e234d868d
* Remove references to named(8)Fernando Apesteguía2022-06-261-5/+1
| | | | | | | | 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
* sys/*/conf/*, docs: fix links to handbookCeri Davies2021-05-201-5/+3
| | | | | | | | | | | | 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
* pkgbase: Put ppp in it's own packageEmmanuel Vadot2021-01-041-0/+1
| | | | | | | | 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
* ppp: Document the fact that ppp_nat is enabled by defaultAllan Jude2020-07-111-1/+10
| | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=363105
* Remove all the RELEASE_CRUNCH defines, they are useless.Warner Losh2019-12-161-8/+0
| | | | | | | | RELEASE_CRUNCH has been broken for a very long time. Remove the last remants from the tree. Notes: svn path=/head/; revision=355821
* Retire the -DRELEASE_CRUNCH define.Warner Losh2019-07-123-13/+2
| | | | | | | | | | | | 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. Notes: svn path=/head/; revision=349938
* Make ppp(8) buildable.Jung-uk Kim2018-09-191-5/+5
| | | | Notes: svn path=/projects/openssl111/; revision=338786
* Add u3g ppp.conf entry. It provides some starting point to makingEdward Tomasz Napierala2018-09-111-0/+7
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=338590
* Add the possibility to mark packets urgent based on their length.Nick Hibma2018-08-175-4/+38
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=337961
* ppp(8): fix code producing debugging logsEugene Grosbein2018-02-106-17/+21
| | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=329105
* SPDX: mostly fixes to previous changes.Pedro F. Giffuni2017-12-131-1/+1
| | | | | | | | Introduce the recently approved BSD-1-Clause and replace 0BSD which never did fit well our use cases. Notes: svn path=/head/; revision=326823
* SPDX: Fix some cases wrongly attributed to MIT.Pedro F. Giffuni2017-11-301-1/+1
| | | | | | | | In the cases of BSD-style license variants without clauses, use 0BSD for the time being in lack of a better description. Notes: svn path=/head/; revision=326398
* various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-27116-1/+233
| | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=326276
* General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-202-1/+5
| | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=326025
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* ppp(8): style(9) fix after r325157Eugene Grosbein2017-10-301-4/+2
| | | | | | | Approved by: mav (mentor) Notes: svn path=/head/; revision=325158
* Fix ppp(8) to add RTF_HOST flag to created host route.Eugene Grosbein2017-10-301-0/+4
| | | | | | | | | Reported by: Mike Tancsa <mike@sentex.net> Approved by: avg (mentor) MFC After: 1 week Notes: svn path=/head/; revision=325157
* Update several more URLsEitan Adler2017-10-291-2/+2
| | | | | | | | - Primarily http -> https - Primarily FreeBSD project URLs Notes: svn path=/head/; revision=325096