christos
333e176687
- sprinkle const
...
- remove unneeded casts
- use more mem*() instead of b*() funcs.
2005-05-29 21:22:52 +00:00
martin
3cde73812d
Fix typo, from C. Plasschaert in PR kern/30069.
2005-04-27 07:48:02 +00:00
christos
d7ec95d370
factor out the interface queueing code into two functions. One used by
...
the non point-to-point interfaces that has one queue, and one used by
the point to point interfaces that has two queues. No functional changes.
XXX: The ALTQ stuff makes the code ugly.
XXX: More cleanup to come
2005-03-31 15:48:13 +00:00
perry
f07677dd81
nuke trailing whitespace
2005-02-26 22:45:09 +00:00
matt
027c11539b
Add IFNET_FOREACH and IFADDR_FOREACH macros and start using them.
2005-01-24 21:25:09 +00:00
itojun
b97cc48910
whitespace
2004-12-22 05:11:24 +00:00
christos
64573a67d7
Sprinkle #ifdef INET to make a GENERIC kernel compile with INET undefined.
2004-12-06 02:59:23 +00:00
yamt
0a9623de9c
call PFIL_IFADDR hooks where appropriate.
2004-09-18 16:04:41 +00:00
itojun
d66a0005a1
sprintf -> snprintf
2004-04-21 17:45:38 +00:00
martin
8133a23a7e
Be more paranoid about data a non-root user may query.
...
Fixes PR kern/25099 by Christian Biere.
2004-04-08 09:26:59 +00:00
martin
d59fb7b8a3
Add a new ioctl SPPPGETSTATUSNCP to query the PPP phase and check wether
...
any NCP is UP.
2003-12-26 23:39:23 +00:00
wiz
ee1b406595
Spell address with two d's. Inspired by similar changes in OpenBSD,
...
originating from Jonathon Gray and forwarded by jmc@openbsd.
2003-11-10 08:51:51 +00:00
mycroft
a72eae7293
Fix previous differently.
2003-10-28 20:21:44 +00:00
christos
82653d230d
Fix uninitialized variable warnings.`
2003-10-26 19:09:44 +00:00
oki
59c580bc38
Correct debug message, mine is myauth, not hisauth.
2003-10-03 10:29:05 +00:00
itojun
269a200e21
minor KNF
2003-10-02 01:27:20 +00:00
itojun
9636351c96
u_short -> u_int16_t
2003-09-05 23:02:40 +00:00
martin
6f2d2eefc7
Rearange dead link detection slightly:
...
As long as we receive data from the peer, don't worry. When we have not
received anything within the "max_noreceive" period, we start sending LCP
echo requests and count them, until we receive an answer (or some data)
or the "maxalive" count of not answered echo requests is reached.
All this is checked at a global 10 seconds interval for all interfaces.
The "max_noreceive" period and the "maxalive" count are configurable per
interface.
2003-09-03 20:48:46 +00:00
martin
2951cb8e99
We should use IFQ_DEQUEUE to get packets from the send queue, not IF_DEQUEUE.
...
Hopefully this will fix ALTQ for ISDN and PPPoE interfaces.
While there remove an unsued function which contained dubious code
(accessing interface queue internals w/o the proper macros).
2003-07-09 20:12:53 +00:00
itojun
8228c94987
don't call if_free_sadl() until very end of if_detach() logic. many of
...
routing table manipulation code assumes the presense of AF_LINK sockaddr.
should fix PR 21581
2003-05-23 10:06:17 +00:00
itojun
b4542a20a6
use arc4random
2003-05-14 23:16:44 +00:00
itojun
5ebd8c7eba
remove #ifdef __FreeBSD__ (code already diverged enough)
2003-05-14 22:41:40 +00:00
tron
0cbe3d790b
Use MRU negotiated with remote system as MTU. This fixes PR kern/18850
...
by Curt Sampson.
2003-01-28 15:36:38 +00:00
simonb
f77e8353aa
Remove a break after a goto.
2003-01-19 23:45:33 +00:00
kristerw
83b5a18c99
Restore the system priority level in case of errors.
...
OK:ed by martin.
2002-12-28 21:09:14 +00:00
itojun
501bf56348
license clarification from the author, via openbsd
...
>BSD-style license from Serge Vakulenko <vak@cronyx.ru>
2002-09-27 06:20:30 +00:00
itojun
c40ace5ea0
KNF
2002-09-25 07:24:06 +00:00
itojun
822449ac65
KNF - return is not a function.
2002-09-11 05:36:26 +00:00
martin
1caaa903fa
If the peer did not answer LCP echo requests in-time, but we got user
...
data through within the last LCP keepalive interval, do not count this
as a keepalive failure.
Addresses parts of kern/17723.
2002-09-01 18:54:12 +00:00
christos
d64bbf607d
Fix async map handling. Many thanks to Joerg Wunsch for the explanation.
2002-07-30 13:16:35 +00:00
christos
42f6b6f836
Patches from Frank Kardel:
...
- length was one off in names and secrets.
- add win 98 kludge but we keep it disabled for now.
- setup the authorization bit early so that we don't end up doing ppp
negotiations without authorization.
2002-07-28 22:16:47 +00:00
christos
59d3d6c274
Don't throw away the name and the secret lengths. This eliminates all the
...
strlen() calls, and there was a whole bunch of them.
2002-07-28 19:54:47 +00:00
christos
450091b937
avoid modifying the buffers, by checking for matching lengths first. From
...
Frank Kardel.
2002-07-28 15:12:29 +00:00
christos
ca989d9a38
Use strcmp() instead of memcmp() because if we get passed a 0 length name
...
and secret, we'll authenticate successfully! While there, rename passwd to
secret so that code looks nicer.
2002-07-27 19:09:07 +00:00
martin
5d9a5f68c8
Use "mono_time" instead of "time" for timeout calculations.
2002-07-13 11:08:03 +00:00
yamt
43b3a8007f
don't access freed memory.
2002-07-11 21:37:51 +00:00
yamt
c56faa76d8
don't access freed memory.
2002-07-11 21:21:53 +00:00
itojun
c6f53f281c
correct tcp header chasing in pp_fastq processing. should fix kern/17491.
2002-07-06 18:33:45 +00:00
itojun
eee0912fd7
don't panic on invalid CONF_ACK from remote (in general, issueing panic
...
on remote input is bad practice)
2002-05-29 01:38:46 +00:00
martin
75a925b327
"if (debug)" some log messages not signaling real errors but happening
...
in normal operation.
2002-04-29 16:29:29 +00:00
martin
493d3dde20
Add support to query the peer for DNS addreses when negotiating IPCP.
...
Add ioctls to retrieve the results.
While here remove a malloc()/free() of an unused buffer.
2002-03-02 16:23:42 +00:00
martin
39764a5363
Use IF_IS_EMPTY and IFQ_IS_EMPTY instead of accessing queue members
...
directly. Noticed by Thomas Klausner.
2002-02-10 15:17:21 +00:00
martin
6121a90ba1
Fix copy&pasto: truncate strings copied in at *their* right length, not
...
some other strings length.
Found by Arne Helme.
2002-01-21 11:37:29 +00:00
jdolecek
ec531589ce
couple cosmetic style fixes, and drop ^L's
2002-01-18 22:39:12 +00:00
martin
301dca6ef4
Make fields in ioctl parameters that are not allowed to be negative u_ints.
...
Better range & sanity checking for ioctl arguments (thanks, Jaromir!)
2002-01-15 12:28:08 +00:00
martin
78ce6cb0f8
Initialize the activity timestamp when opening a connection. Only idle-
...
timeout connection that made it to phase NETWORK yet. (For drivers using
the internal timeout mechanism; isdnd, that does the timeout handling for
ISDN drivers, still needs to be fixed.)
Thanks to Wolfgang Solfrank for finding this.
2002-01-14 07:39:14 +00:00
martin
da249d7da1
Implement a retry counter for failed authorizations and limit it to
...
a configurable maximum (default: 5).
Some ISPs shut down accounts (at least temporarily) after to many bad
retries. This hit me recently due to a stupid pilot error and the fast
retry rate.
2002-01-07 10:49:02 +00:00
martin
45514531fd
Implement an activity timestamp, recording the last time payload data
...
passed through.
Implement optional idle timeout.
2002-01-06 20:14:29 +00:00
thorpej
ce4f05c0a3
Fix LP64 printf format problem.
2002-01-05 19:26:44 +00:00
martin
99772f59c4
Move net/if_sppp.h to net/if_spppvar.h, create a new net/if_sppp.h
...
containing the userland visible thinks (i.e. ioctl definitions).
Remove all (both) old ioctls, as they had a brain dead API and made keeping
binary compatibility more or less impossible.
Replace by several new ioctls. While there, remove any arbitrary limits
(resulting from the old, broken ioctls) and allow any length of names
and passwords.
2002-01-04 12:21:24 +00:00