History log of /freebsd-current/sys/netgraph/ng_mppc.c
Revision Date Author Comments
# 2ff63af9 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .h pattern

Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/


# 662c1305 01-Sep-2020 Mateusz Guzik <mjg@FreeBSD.org>

net: clean up empty lines in .c and .h files


# 7029da5c 26-Feb-2020 Pawel Biernacki <kaktus@FreeBSD.org>

Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)

r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are
still not MPSAFE (or already are but aren’t properly marked).
Use it in preparation for a general review of all nodes.

This is non-functional change that adds annotations to SYSCTL_NODE and
SYSCTL_PROC nodes using one of the soon-to-be-required flags.

Mark all obvious cases as MPSAFE. All entries that haven't been marked
as MPSAFE before are by default marked as NEEDGIANT

Approved by: kib (mentor, blanket)
Commented by: kib, gallatin, melifaro
Differential Revision: https://reviews.freebsd.org/D23718


# ec5753e0 19-Jan-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

mppc - Finish pluging NETGRAPH_MPPC_COMPRESSION.

There were several places where reference to compression were left
unfinished. Furthermore, KASSERTs contained references to MPPC_INVALID
which is not defined in the tree and therefore were sure to break with
INVARIANTS: comment them out.

Reported by: Eugene Grosbein
PR: 216265
MFC after: 3 days


# af3b2549 27-Jun-2014 Hans Petter Selasky <hselasky@FreeBSD.org>

Pull in r267961 and r267973 again. Fix for issues reported will follow.


# 37a107a4 27-Jun-2014 Glen Barber <gjb@FreeBSD.org>

Revert r267961, r267973:

These changes prevent sysctl(8) from returning proper output,
such as:

1) no output from sysctl(8)
2) erroneously returning ENOMEM with tools like truss(1)
or uname(1)
truss: can not get etype: Cannot allocate memory


# 3da1cf1e 27-Jun-2014 Hans Petter Selasky <hselasky@FreeBSD.org>

Extend the meaning of the CTLFLAG_TUN flag to automatically check if
there is an environment variable which shall initialize the SYSCTL
during early boot. This works for all SYSCTL types both statically and
dynamically created ones, except for the SYSCTL NODE type and SYSCTLs
which belong to VNETs. A new flag, CTLFLAG_NOFETCH, has been added to
be used in the case a tunable sysctl has a custom initialisation
function allowing the sysctl to still be marked as a tunable. The
kernel SYSCTL API is mostly the same, with a few exceptions for some
special operations like iterating childrens of a static/extern SYSCTL
node. This operation should probably be made into a factored out
common macro, hence some device drivers use this. The reason for
changing the SYSCTL API was the need for a SYSCTL parent OID pointer
and not only the SYSCTL parent OID list pointer in order to quickly
generate the sysctl path. The motivation behind this patch is to avoid
parameter loading cludges inside the OFED driver subsystem. Instead of
adding special code to the OFED driver subsystem to post-load tunables
into dynamically created sysctls, we generalize this in the kernel.

Other changes:
- Corrected a possibly incorrect sysctl name from "hw.cbb.intr_mask"
to "hw.pcic.intr_mask".
- Removed redundant TUNABLE statements throughout the kernel.
- Some minor code rewrites in connection to removing not needed
TUNABLE statements.
- Added a missing SYSCTL_DECL().
- Wrapped two very long lines.
- Avoid malloc()/free() inside sysctl string handling, in case it is
called to initialize a sysctl from a tunable, hence malloc()/free() is
not ready when sysctls from the sysctl dataset are registered.
- Bumped FreeBSD version to indicate SYSCTL API change.

MFC after: 2 weeks
Sponsored by: Mellanox Technologies


# ee652839 22-May-2014 Alexander Motin <mav@FreeBSD.org>

Make ng_mppc to not disable the node in case of multiple packet loss.
Quite often it can be just packet reorder, and killing link in such case
is inconvenient. Add few sysctl's to control that behavior.

PR: kern/182212
Submitted by: Eugene Grosbein <egrosbein@rdtc.ru>
MFC after: 2 weeks


# eb1b1807 05-Dec-2012 Gleb Smirnoff <glebius@FreeBSD.org>

Mechanically substitute flags from historic mbuf allocator with
malloc(9) flags within sys.

Exceptions:

- sys/contrib not touched
- sys/mbuf.h edited manually


# 5372c30b 25-May-2012 Gleb Smirnoff <glebius@FreeBSD.org>

Revert my local not yet properly tested changes, that leaked in
with r235923.


# 38f1b2d1 24-May-2012 Gleb Smirnoff <glebius@FreeBSD.org>

Revert r220768 for ng_ksocket. This node is special and
when it is cloning, its constructor method may be called
in a context that isn't allowed to sleep.

Noticed by: Vadim Goncharov


# d745c852 06-Nov-2011 Ed Schouten <ed@FreeBSD.org>

Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs.

This means that their use is restricted to a single C file.


# 7a0b13ed 25-Jul-2011 Andriy Gapon <avg@FreeBSD.org>

remove RESTARTABLE_PANICS option

This is done per request/suggestion from John Baldwin
who introduced the option. Trying to resume normal
system operation after a panic is very unpredictable
and dangerous. It will become even more dangerous
when we allow a thread in panic(9) to penetrate all
lock contexts.
I understand that the only purpose of this option was
for testing scenarios potentially resulting in panic.

Suggested by: jhb
Reviewed by: attilio, jhb
X-MFC-After: never
Approved by: re (kib)


# 674d86bf 18-Apr-2011 Gleb Smirnoff <glebius@FreeBSD.org>

Node constructor methods are supposed to be called in syscall
context always. Convert nodes to consistently use M_WAITOK flag
for memory allocation.

Reviewed by: julian


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# d9b0781a 14-Apr-2010 Alexander Motin <mav@FreeBSD.org>

MFC r206021, r206032, r206049, r206050:
Remove some more alignment constraints.


# 39228864 31-Mar-2010 Alexander Motin <mav@FreeBSD.org>

Remove some more alignment constraints.


# 67898a23 18-Jan-2009 Alexander Motin <mav@FreeBSD.org>

If source mbuf chain consists of only one mbuf, use it directly as source
buffer to avoid extra copying.


# e4651e05 18-Jan-2009 Alexander Motin <mav@FreeBSD.org>

Use m_unshare()+m_copyback() instead of m_freem()+m_devget() to keep
original mbuf chain headers. It can be less efficient in some cases, but it
looks better then mess of copying headers into the nonempty chain.


# b3d298b9 16-Dec-2008 Alexander Motin <mav@FreeBSD.org>

Unroll two loops of SHA1Update(). 60 bytes of static memory is not a price.


# 11d1cade 06-Dec-2008 Alexander Motin <mav@FreeBSD.org>

Carefully handle memory errors to keep peers compression/encryption state
consistent. There are some cases reported where peers fatally getting out
of sync without any visible reason. I hope this solve the problem.


# e11e3f18 23-Oct-2008 Dag-Erling Smørgrav <des@FreeBSD.org>

Fix a number of style issues in the MALLOC / FREE commit. I've tried to
be careful not to fix anything that was already broken; the NFSv4 code is
particularly bad in this respect.


# 1ede983c 23-Oct-2008 Dag-Erling Smørgrav <des@FreeBSD.org>

Retire the MALLOC and FREE macros. They are an abomination unto style(9).

MFC after: 3 months


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 06c51e6e 18-May-2007 Alexander Motin <mav@FreeBSD.org>

Fix build with NETGRAPH_MPPC_COMPRESSION but without NETGRAPH_MPPC_ENCRYPTION.

Approved by: glebius (mentor)


# ce52e8f4 11-May-2007 Alexander Motin <mav@FreeBSD.org>

Performance optimization of the "encryption without compression" case by
avoiding memory allocation and data copying.
Encrypting directly at the original mbuf chain.

Approved by: glebius (mentor)


# 6370fd6b 04-May-2007 Alexander Motin <mav@FreeBSD.org>

Avoid extra rc4_init() when ng_mppc_updatekey() going to do it anyway.

Approved by: glebius (mentor)


# adecf751 04-May-2007 Alexander Motin <mav@FreeBSD.org>

Compact code a bit

Approved by: glebius (mentor)


# 755bc287 04-May-2007 Alexander Motin <mav@FreeBSD.org>

Make coherency counter 12bit as it should

Approved by: glebius (mentor)


# 592009a3 04-May-2007 Alexander Motin <mav@FreeBSD.org>

Fix small mistake (sizeof(pad2) instead of sizeof(pad1))

Approved by: glebius (mentor)


# 8239d414 04-May-2007 Alexander Motin <mav@FreeBSD.org>

Remove unneded bzero().
SHA1Final() does not require clean buffer.

Approved by: glebius (mentor)


# 10d645b7 14-Oct-2005 Yaroslav Tykhiy <ytykhiy@gmail.com>

In preparation for making the modules actually use opt_*.h files
provided in the kernel build directory, fix modules that were
failing to build this way due to not quite correct kernel option
usage. In particular:

ng_mppc.c uses two complementary options, both of which are listed
in sys/conf/files. Ideally, there should be a separate option for
including ng_mppc.c in kernel build, but now only
NETGRAPH_MPPC_ENCRYPTION is usable anyway, the other one requires
proprietary files.

nwfs and smbfs were trying to ensure they were built with proper
network components, but the check was rather questionable.

Discussed with: ru


# 2f07580b 03-Jun-2005 Gleb Smirnoff <glebius@FreeBSD.org>

MPPC node is not thread safe.

PR: kern/79990
Reported by: Arcadiy Ivanov
Reported by: atckoe.zlo @ gmail.com
MFC after: 1 week


# c398230b 06-Jan-2005 Warner Losh <imp@FreeBSD.org>

/* -> /*- for license, minor formatting changes


# f8aae777 28-May-2004 Julian Elischer <julian@FreeBSD.org>

Switch to using C99 sparse initialisers for the type methods array.
Should make no binary difference.

Submitted by: Gleb Smirnoff <glebius@cell.sick.ru>
Reviewed by: Harti Brandt <harti@freebsd.org>
MFC after: 1 week


# 233896e9 05-Feb-2003 Doug Ambrisko <ambrisko@FreeBSD.org>

Take the rc4 code out of ng_mppc module so we don't fail to load when
we have the rc4 code already in the kernel (via wlan stuff or awi).
Add a dependency on the rc4 module so if it doesn't exist then load it.

Reviewed by: archie


# f3059f39 13-Dec-2002 Archie Cobbs <archie@FreeBSD.org>

Fix two bugs:

(a) Save control message return address only if NGM_MPPC_CONFIG_DECOMP
(b) Properly count the number of required re-key operations
when we loose synchronization and have to resync

MFC after: 3 days


# facfd889 21-Aug-2002 Archie Cobbs <archie@FreeBSD.org>

Don't use "NULL" when "0" is really meant.


# fd8e4ebc 18-Feb-2002 Mike Barcroft <mike@FreeBSD.org>

o Move NTOHL() and associated macros into <sys/param.h>. These are
deprecated in favor of the POSIX-defined lowercase variants.
o Change all occurrences of NTOHL() and associated marcros in the
source tree to use the lowercase function variants.
o Add missing license bits to sparc64's <machine/endian.h>.
Approved by: jake
o Clean up <machine/endian.h> files.
o Remove unused __uint16_swap_uint32() from i386's <machine/endian.h>.
o Remove prototypes for non-existent bswapXX() functions.
o Include <machine/endian.h> in <arpa/inet.h> to define the
POSIX-required ntohl() family of functions.
o Do similar things to expose the ntohl() family in libstand, <netinet/in.h>,
and <sys/param.h>.
o Prepend underscores to the ntohl() family to help deal with
complexities associated with having MD (asm and inline) versions, and
having to prevent exposure of these functions in other headers that
happen to make use of endian-specific defines.
o Create weak aliases to the canonical function name to help deal with
third-party software forgetting to include an appropriate header.
o Remove some now unneeded pollution from <sys/types.h>.
o Add missing <arpa/inet.h> includes in userland.

Tested on: alpha, i386
Reviewed by: bde, jake, tmm


# 34fd2381 14-Dec-2001 Archie Cobbs <archie@FreeBSD.org>

Add support for 56 bit MPPE encryption.

MFC after: 3 days


# 6e551fb6 10-Dec-2001 David E. O'Brien <obrien@FreeBSD.org>

Update to C99, s/__FUNCTION__/__func__/,
also don't use ANSI string concatenation.


# b40ce416 12-Sep-2001 Julian Elischer <julian@FreeBSD.org>

KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.

Sorry john! (your next MFC will be a doosie!)

Reviewed by: peter@freebsd.org, dillon@freebsd.org

X-MFC after: ha ha ha ha


# 9c8c302f 10-Jan-2001 Julian Elischer <julian@FreeBSD.org>

Fix some memory leaks
Add memory leak detection assitance.


# 30400f03 07-Jan-2001 Julian Elischer <julian@FreeBSD.org>

Part 2 of the netgraph rewrite.
This is mostly cosmetic changes, (though I caught a bug or two while
makeing them)
Reviewed by: archie@freebsd.org


# 069154d5 05-Jan-2001 Julian Elischer <julian@FreeBSD.org>

Rewrite of netgraph to start getting ready for SMP.
This version is functional and is aproaching solid..
notice I said APROACHING. There are many node types I cannot test
I have tested: echo hole ppp socket vjc iface tee bpf async tty
The rest compile and "Look" right. More changes to follow.
DEBUGGING is enabled in this code to help if people have problems.


# 589f6ed8 18-Dec-2000 Julian Elischer <julian@FreeBSD.org>

Divorce the kernel binary ABI version number from the message
format version number. (userland programs should not need to be
recompiled when the netgraph kernel internal ABI is changed.

Also fix modules that don;t handle the fact that a caller may not supply
a return message pointer. (benign at the moment because the calling code
checks, but that will change)


# 859a4d16 12-Dec-2000 Julian Elischer <julian@FreeBSD.org>

Reviewed by: Archie@freebsd.org
This clears out my outstanding netgraph changes.
There is a netgraph change of design in the offing and this is to some
extent a superset of soem of the new functionality and some of the old
functionality that may be removed.

This code works as before, but allows some new features that I want to
work with and evaluate. It is the basis for a version of netgraph
with integral locking for SMP use.

This is running on my test machine with no new problems :-)


# 99cdf4cc 18-Nov-2000 David Malone <dwmalone@FreeBSD.org>

Add the use of M_ZERO to netgraph.

Submitted by: josh@zipperup.org
Submitted by: Robert Drehmel <robd@gmx.net>
Submitted by: archie
Approved by: archie


# cc3bbd68 24-Oct-2000 Julian Elischer <julian@FreeBSD.org>

Since neither archie nor I work at Whistle any more, change our email
addresses to be the more usefu @freebsd.org ones
so we can keep getting bug-reports.
- man pages to follow..


# ee79f58e 22-Sep-2000 Archie Cobbs <archie@FreeBSD.org>

Remove unnecessary #include's as reported by phk's script.


# 65b9a0da 21-Sep-2000 Archie Cobbs <archie@FreeBSD.org>

Allocate all memory (including within node constructors) with M_NOWAIT
instead of M_WAITOK, to allow for maximum flexibility.


# 840f7127 21-Sep-2000 Archie Cobbs <archie@FreeBSD.org>

Allocate memory with M_NOWAIT instead of M_WAITOK because we could
be called in an interrupt context.


# a4ec03cf 28-Apr-2000 Julian Elischer <julian@FreeBSD.org>

Two simple changes to the kernel internal API for netgraph modules,
to support future work in flow-control and 'packet reject/replace'
processing modes.

reviewed by: phk, archie


# 3389ae93 19-Apr-2000 Poul-Henning Kamp <phk@FreeBSD.org>

Remove ~25 unneeded #include <sys/conf.h>
Remove ~60 unneeded #include <sys/malloc.h>


# af7ab184 09-Apr-2000 Archie Cobbs <archie@FreeBSD.org>

A netgraph node that implements Microsoft Point-to-Point compression
(MPPC) and Microsoft Point-to-Point encryption (MPPE) protocols.

Note: the MPPC part is disabled as it requires proprietary files.

Obtained from: Whistle source tree