Commit Graph

27 Commits

Author SHA1 Message Date
Alexander Motin
5b363c09dc Add support for PPP-Max-Payload PPPoE tag (RFC4638).
Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after:	2 weeks
2015-09-11 09:15:27 +00:00
Gleb Smirnoff
5c6d5d5598 Add constant for PPP-Max-PayLoad tag.
Submitted by:	Dmitry Luhtionov <dmitryluhtionov gmail.com>
2013-07-23 10:25:34 +00:00
Ed Schouten
60d234c583 Make Netgraph compile with Clang.
Clang disallows structs with variable length arrays to be nested inside
other structs, because this is in violation with ISO C99. Even though we
can keep bugging the LLVM folks about this issue, we'd better just fix
our code to not do this. This code seems to be the only code in the
entire source tree that does this.

I haven't tested this patch by using the kernel modules in question, but
Diane Bruce and I have compared disassembled versions of these kernel
modules. We would have expected them to be exactly the same, but due to
randomness in the register allocator and reordering of instructions,
there were some minor differences.

Approved by:	julian
2009-03-03 18:47:33 +00:00
Alexander Motin
b06ccdeab3 Remove some prehistoric never used defines. 2007-12-26 19:15:07 +00:00
Gleb Smirnoff
b1ba28df1d Fix ng_pppoe(4) after turning off "autosrc feature" on ng_ether(4).
- Store the Ethernet header in node softc.
- Initialize header with dst addr and ethertype in node
  constructor method.
- In node connect method send NGM_ETHER_GET_ENADDR message
  downwards.
- If received reply from ng_ether(4) store the src addr
  in softc.
- Add NGM_PPPOE_SETENDADDR message that allows user to
  override the address with whatever he/she wants.
2006-08-09 09:56:58 +00:00
Gleb Smirnoff
1c8aa594a8 o Introduce D-Link compat mode, that is default to off and can be set
by NGM_PPPOE_SETMODE message. When D-Link compat mode is on, we will
  broadcast PADI with empty Service-Name to all listening hooks.
o Rewrite the compatibility options. Before we had two modes - standard
  and non-standard (aka 3Com). Now we have standard mode and two compat
  flags, that can be combined.
o Be consistent and do s/STUPID/3COM/g. I don't say that 3Com mode isn't
  stupid, just want to make code easier to read.
2006-01-27 10:56:22 +00:00
Ruslan Ermilov
d56ace0997 Use variable-sized arrays where appropriate. 2005-10-28 14:41:28 +00:00
Warner Losh
c398230b64 /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
Gleb Smirnoff
fdc755d162 When node is server serve both standard RFC2516 and non-standard 3Com
clients simultaneously. When node is client its mode is configured
with a control message.

sysctl net.graph.nonstandard_pppoe is deprecated but kept for
backward compatibility for some time.

Approved by:	julian
2004-07-27 19:47:13 +00:00
David Malone
f6fee71d57 Make the vaule of PTT_RELAY_SID match the RFC. This should help PPPoE
users that are working with relayed PPPoE.

Submitted by:	Bodo Rüskamp <jordbaer@mac.com>
PR:		44936
Approved by:	julian
MFC after:	1 week
2004-03-18 12:34:14 +00:00
Hartmut Brandt
87e2c66a6a Get rid of the deprecated *LEN constants in favour of the new
*SIZ constants that include the trailing \0 byte.
2004-01-26 14:05:31 +00:00
Ruslan Ermilov
e20480bfb6 Use a single style of multiple inclusion protection for Netgraph headers.
Reviewed by:	archie, harti, emax
2003-11-11 12:30:37 +00:00
Alfred Perlstein
4f492bfab5 use __packed. 2002-09-23 18:54:32 +00:00
Archie Cobbs
f0184ff8e3 Fix GCC warnings caused by initializing a zero length array. In the process,
simply things a bit by getting rid of 'struct ng_parse_struct_info' which
was useless because it only contained one field.

MFC after:	2 weeks
2002-05-31 23:48:03 +00:00
Brian Somers
87c4cce00e Add a NGM_PPPOE_SESSIONID message to the ng_pppoe node.
This message is sent to the control socket when the SessionID
is established.

Approved by:	archie (after a very cursory glance)
2002-05-14 12:32:41 +00:00
Brian Somers
c48a0b5fb4 Send a NGM_PPPOE_ACNAME message to userland when a node is connected.
Submitted by:		Andre Albsmeier <andre@albsmeier.net>
Shuffled about by:	brian
Approved by:		julian
2002-02-20 15:51:11 +00:00
Julian Elischer
bfa7e882d1 Shuffle sysctls a bit (thankyou whoever made them dynamic for modules)
and add a sysctl to pppoe to activate non standard ethertypes
so that idiot ISPs (apparently in France) who use
equipment from idiot suppliers (rumour says 3com)
who use nonstandard ethertypes can still connect.

 "yep, sure we do pppoe, we use a different identifier to that dictated in
 the standard, but sure it's pppoe!"

sysctl -w net.graph.stupid_isp=1 enables the changeover.
2001-02-23 16:34:22 +00:00
Julian Elischer
7600241b05 I have no idea at all why this file was not included in the last commit. 2000-12-12 22:35:36 +00:00
Brian Somers
27121ab1a4 Go back to using data_len in struct ngpppoe_init_data after discussions
with Julian and Archie.

Implement a new ``sizedstring'' parse type for dealing with field pairs
consisting of a uint16_t followed by a data field of that size, and use
this to deal with the data_len and data fields.

Written by:		Archie with some input by me
Agreed in principle by:	julian
2000-11-16 23:14:53 +00:00
Brian Somers
76a70671fc Change the format of ngpppoe_init_data so that the provider is NUL
terminated and the data_len field is no longer necessary.

Add ASCII2BINARY and BINARY2ASCII capabilities.

The old format is still understood and dealt with, but can't do
the ASCII2BINARY and BINARY2ASCII stuff.

Approved by: archie
2000-10-31 02:45:24 +00:00
Julian Elischer
cc3bbd68c5 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..
2000-10-24 17:32:45 +00:00
Julian Elischer
d0fef8084f change intial timeout for session negotiation from 1 to 2 seconds.
One second was being hit too many times in normal situations.
1999-12-01 08:05:56 +00:00
Julian Elischer
12f035e0fd Remove a null pointer reference
Submitted by: Brian Somers (brian@freebsd.org)
1999-11-09 00:31:04 +00:00
Julian Elischer
dc90cad9d2 Start making the contents of the generic framework opaque to the nodes.
This step: IDs are no-longer the address of the node.
Reviewd by: Archie@freebsd.org
1999-11-01 00:31:14 +00:00
Julian Elischer
8876b55d7b change PPPoE occurences to pppoe. Not JUST a cosmeting change.
some occurrances needed to be the same as the filenmnae which was pppoe
 not PPPoE.
1999-10-27 11:29:51 +00:00
Julian Elischer
b58a8a3b1d Now that Netgraph is in the system there are some cleanups we can do.
Also save a slightly closer to completion version of the PPPOE code.

Submitted by: Archie Cobbs <archie@freebsd.org>
1999-10-23 04:28:11 +00:00
Julian Elischer
4cf49a4355 Whistle's Netgraph link-layer (sometimes more) networking infrastructure.
Been in production for 3 years now. Gives Instant Frame relay to if_sr
and if_ar drivers, and PPPOE support soon. See:
ftp://ftp.whistle.com/pub/archie/netgraph/index.html
for on-line manual pages.

Reviewed by: Doug Rabson (dfr@freebsd.org)
Obtained from:  Whistle CVS tree
1999-10-21 09:06:11 +00:00