| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Add all listening hooks into LIST to simplify searches.
Use ng_findhook() instead of own equal implementation.
|
|
|
|
| |
Make session ID generator thread-safe.
|
| |
|
|
|
|
| |
Print the hook pointer as other functions do.
|
|
|
|
|
|
|
| |
the variable that appears as if it should've been there.
Pointy hat to: mav
Not tested either by: benno
|
|
|
|
| |
for big number of concurrent sessions.
|
|
|
|
|
|
|
| |
argument. It allows ppp, mpd or any other node consumer to request
connection to specified access concentrator.
Proposed by: Alexander A. Burylov <burylov@mail.ru>
|
| |
|
|
|
|
| |
to simplify code and reduce stack usage.
|
|
|
|
| |
as much times as it has cases inside of it.
|
|
|
|
| |
Approved by: re (kensmith), glebius (mentor)
|
|
|
|
|
|
|
| |
simplifies code and should speedup pppoe_findsession() function which is
called for every incoming packet.
Approved by: re (kensmith), glebius (mentor)
|
|
|
|
|
|
| |
variable. Second part is not so important, but IMO is also good.
Approved by: re (kensmith), glebius (mentor)
|
|
|
|
| |
Submitted by: ru
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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.
|
|
|
|
|
|
|
|
| |
- Print node ID, where possible.
- Prepend log messages with function name, or at least with "ng_pppoe".
Reviewed by: julian
Tested by: Joao Barros <joao.barros gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PPPoE AC, servicing a specific Service-Name, when client sends a PADI
with an empty Service-Name. Should it reply with all available service
names or should it be silent? Our implementation had chosen the latter,
while some other had chosen the former (they say Linux and Cisco). Now
some PPPoE clients appear, that rely on the assumption that AC will
send all names in a PADO reply to a PADI with wildcard Service-Name.
These clients can't connect to FreeBSD AC.
I have requested comments from authors of RFC2516 via email, but
received no reply.
This change makes FreeBSD AC compatible with D-Link DI-614+ and
D-Link DI-624+ SOHO routers, and probably others.
Big thanks to D-Link's Russian office, namely Victor Platov, for
assistance and support in investigation and testing of this change.
Details:
o Split pppoe_match_svc() into three different functions serving
different purposes:
- pppoe_match_svc() - match non-empty Service-Name tag from PADI
against all available hooks in listening state.
- pppoe_find_svc() - check that given Service-Name is not yet
registered.
- pppoe_broadcast_padi() - send a copy of PADI packet with empty
Service-Name tag to all listening hooks.
o For NGM_PPPOE_LISTEN message use pppoe_find_svc().
o In ng_pppoe_rcvdata() in a PADI case use pppoe_match_svc() for
a non-empty Service-Name tag, and pppoe_broadcast_padi() in
either case.
A side effect from the above changes is that now pppoed(8) and mpd
will reply to a empty Service-Name PADI sending a PADO with two
Service-Name tags - an empty one and correct one. This is not fatal,
and will be corrected in pppoed(8) and mpd later. No need to update
node interface version.
Supported by: D-Link
|
|
|
|
|
|
|
| |
- Add some ktr(4) debugging.
- Whitespaces at eols.
- Tidy up comments.
- u_intXX -> uintXX
|
|
|
|
|
| |
PR: kern/86258
Submitted by: Hiroshi Oota <ghelp excite.co.jp>
|
|
|
|
|
|
|
|
|
|
| |
PPPoE modes. The interface was declared obsoleted before 5.3-RELEASE.
When running as access concentrator ng_pppoe(4) supports both modes
simultanously. When running as client mode can be swicthed in ppp(8)
configuration.
Approved by: re (scottl)
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
- remove spl(9) calls
Tested by: Ilya Pizik
Approved by: julian (mentor)
|
|
|
|
|
|
|
|
| |
macros with 'do {} while (0)' to avoid error in case macro is
not defined.
Prodded by: julian, archie
Pointy hat to: glebius
|
|
|
|
|
| |
Requested by: maxim
Approved by: julian (mentor)
|
|
|
|
|
|
|
|
| |
in enum {}, and then redefined with #define.
No warnings from compiler, though.
Submitted by: bz
Pointy hat to: glebius
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
ethernet headers is unsynchronized.
|
|
|
|
|
|
| |
the old way of doing it.
Submitted by: Gleb Smirnoff <glebius@cell.sick.ru>
|
|
|
|
|
|
|
|
| |
Should make no binary difference.
Submitted by: Gleb Smirnoff <glebius@cell.sick.ru>
Reviewed by: Harti Brandt <harti@freebsd.org>
MFC after: 1 week
|
|
|
|
| |
*SIZ constants that include the trailing \0 byte.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
which means "always stay in the standard mode of PPPoE operation
regardless of any junk floating around."
As the referenced PR stated clearly, the old default setting of 0
was extremely dangerous because it opened a possibility for a
spurious frame not only to put down a single PPPoE node running
FreeBSD, but to plague *every* FreeBSD node in a PPPoE network in
such a way that those nodes would keep poisoning each other until
rebooted simultaneously.
PR: kern/47920
Reviewed by: Gleb Smirnoff <glebius <at> cell.sick.ru>
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
nonstandard. They differ in the values of certain fields in
the PPPoE frame. Previously, ng_pppoe would start in standard
mode, yet switch to nonstandard one upon reception of a single
nonstandard frame. After having done so, ng_pppoe would be unable
to interact with standard PPPoE peers. Thus, a DoS condition
existed that could be triggered by a buggy peer or malicious party.
Since few people have expressed their displeasure WRT this problem,
the default operation of ng_pppoe is left untouched for now. However,
a new value for the sysctl net.graph.nonstandard_pppoe is introduced,
-1, which will force ng_pppoe stay in standard mode regardless of any
bogus frames floating around.
PR: kern/47920
Submitted by: Gleb Smirnoff <glebius <at> cell.sick.ru>
MFC after: 1 week
|
|
|
|
| |
Approved by: trb
|
|
|
|
| |
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Reviewed by: julian, brian
MFC after: 1 week
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
This message is sent to the control socket when the SessionID
is established.
Approved by: archie (after a very cursory glance)
|
|
|
|
|
|
| |
Submitted by: Andre Albsmeier <andre@albsmeier.net>
Shuffled about by: brian
Approved by: julian
|
|
|
|
| |
also don't use ANSI string concatenation.
|
| |
|
|
|
|
|
|
|
| |
4 bytes to the right on the alpha.
Tested by: Thomas Pornin <Thomas.Pornin@ens.fr>
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LISTENed for, return EEXISTS.
Only match the magic "*" service tag if no other LISTEN service tags
match.
Require an explicit LISTEN for an empty service tag in order to match
empty service requests.
Approved by: julian
MFC after: 3 days
|