summaryrefslogtreecommitdiff
path: root/sys/net/if_spppsubr.c
AgeCommit message (Collapse)Author
2009-07-27tiemout_add -> timeout_add_secBret Lambert
ok claudio@
2009-07-13Do the same rdomain checking in sppp as we do in the Ethernet case.Claudio Jeker
Encapsulated pppoe packets are moved into the rdomain of the physical interface because it is possible that a pppoe(4) interface is in a different rdomain then the physical interface. OK reyk@
2009-02-18Free authentication data when detaching sppp from interface.Can Erkin Acar
2009-02-16allocate the large structures instead of putting them on the stack, andTheo de Raadt
use M_CANWAIT throughout ok sthen canacar claudio
2009-02-16Allow username and password to be up to 255 characters in length.Can Erkin Acar
Tested by many, thanks. Put it in" deraadt@
2009-02-06Remove bogus casts of integer constants SPPPIO[GS]DEFS to caddr_tAlexander Yurchenko
and fix typo while here. ok canacar@
2009-01-31u_char is not compatible with default argument promotion type thusAlexander Yurchenko
can't be used with va_start. change it to u_int. ok miod@
2008-06-09rename arc4random_bytes => arc4random_buf to match libc's nicer name;Damien Miller
ok deraadt@
2008-06-08Don't spam dmesg with sppp messages, instead use log(9).Claudio Jeker
OK canacar@ some time ago
2008-05-17Initialize the timeouts only once instead of everytime they are startedCan Erkin Acar
Prevents hangs as reported and tested by James Stark, PR:5795, ok henning@
2008-05-11Check to make sure pp_tlf is not NULL in sppp_keepalive() before calling it.Brad Smith
From NetBSD ok canacar@
2008-05-11When passing opt[] array as an argument, use opt instead of &opt. WhileCan Erkin Acar
they point to the same address, this is more readable. ok claudio@
2007-12-041500 is a 'magic number' in the protocol that all implementationsClaudio Jeker
must be able to handle as MRU but while testing pppoe(4) against a pppoe(8) server I figured out that pppoe(8) insists on a MRU 1492. Because of this we allow the offered MRU to be between PP_MIN_MRU and PP_MAX_MRU especially because the MRU is not used at all as long as it is smaller then PP_MAX_MRU. OK canacar@
2007-11-26typos; ok jmc@Martynas Venckus
sys/netinet/in_pcb.c and sys/net/bridgestp.c ok henning@ sys/dev/pci/bktr/* ok jakemsr@
2007-11-21simplify sppp_chap_scr() now that we are using arc4random_bytes()Can Erkin Acar
2007-11-16use arc4random_bytes() instead of multiple arc4random() calls;Damien Miller
ok deraadt@ dlg@ henric@ mcbride@
2007-11-01correct fixTheo de Raadt
2007-11-01tsk tsk tsk, noone tested this; spotted by canacarTheo de Raadt
2007-10-31Don't leak potentially secret authname through ioctl interface.Mike Belopuhov
Suggestions from mpf@ and canacar@ ok deraadt mpf canacar
2007-09-25Handle incoming protocol reject packets now that we haveCan Erkin Acar
more than one protocol. From FreeBSD, reported and tested by jmc@
2007-09-05IPv6 support for sppp layer, based on NetBSD version.Can Erkin Acar
ok claudio@
2007-08-28The m_pulldown used for aligning was not copying the header,Can Erkin Acar
revert back to m_pullup2. Reported and tested by Enache Adrian additional testing by naddy@ and claudio@ ok claudio@, deraadt@
2007-08-20Align the packet after the ppp header.Can Erkin Acar
The earlier change was broken in sparc due to alignment problems. reported and tested by nady@, ok deraadt@ claudio@
2007-08-14Make sure all the packet is in one continuous mbuf.Can Erkin Acar
This is a bandaid solution, a better solution will go in post 4.2. Reported and tested by Joerg Zinke. ok claudio@, deraadt@
2007-08-07Use the length of the mbuf instead of the packet.Can Erkin Acar
When sending a protocol reject. Prevents reading past the mbuf in case the mbuf does not cover the whole packet. ok claudio@, henning@
2007-06-06remove remaining IPX hooks. all inside #ifdef IPX, so no actual changeHenning Brauer
2007-05-28Users of arc4random() should include dev/rndvar.h directly.Ryan Thomas McBride
ok dlg claudio
2007-05-20Handle IP address stuff in tls/tlf state messagesCan Erkin Acar
instead of open/close events. Fixes PR 5457 where an extra open event arrived due to an authentication timeout/retransmission and confused things. Tested by RD Thrush and mpf@, discussions and ok mpf@
2007-04-18Typo in comment. From Brad.Marco Pfatschbacher
2007-04-17Add support for setting the address of the ppp peer.Marco Pfatschbacher
Use the proper in_ifscrub() / in_ifinit() calls for address changes to generate routing messages. The correct way to set the default route now needs the -ifp option, e.g. route add default -ifp pppoe0 0.0.0.1 Since the route is set right after bringing the interface up, it still works w/out -ifp though. Changes mostly from NetBSD. Tested by Matthias Bauer and bluhm@ OK canacar@
2007-03-19Use u_int32_t instead of u_long for IP addresses.Marco Pfatschbacher
OK claudio@
2007-02-14Consistently spell FALLTHROUGH to appease lint.Jonathan Gray
ok kettenis@ cloder@ tom@ henning@
2007-02-11Remove _KERNEL_OPT leftovers.Miod Vallat
2006-12-06Missing newline in printf.Bernd Ahlers
ok canacar@
2006-08-28Check for illegal option lengths when parsing LCP packetsCan Erkin Acar
and drop such bad packets. Also remove some redundant mallocs. This fixes possible heap overflows when forming replys to such bad packets as discovered by Martin Husemann and Pavel Cahyna. reported by NetBSD, initial diff from markus@, additional comments by claudio@, ok markus@
2006-07-11Only print link state changes if interface is in debug mode.Can Erkin Acar
Affects devices using the sppp layer (pppoe, art, san, lmc) ok deraadt@
2006-07-04logging should be in debug mode only. if every network driver did aTheo de Raadt
dmesg printf everytime they came up, would that be a better world?
2006-07-02diff from peter phillip at freenet dot de:Reyk Floeter
the "pppoe0: up" message is annoying when one is on console and the system has been configured to recall the ISP every minute or so. Moving the printf() to a log() fixes this and the "pppoe0: up" message is still seen in logs and dmesg. ok canacar@
2006-03-04With the exception of two other small uncommited diffs this movesBrad Smith
the remainder of the network stack from splimp to splnet. ok miod@
2006-02-24Another gem from the the-world-runs-on-i386 departement. Using u_long inClaudio Jeker
a packet format causes some troubles on 64bit archs. This fixes a sppp(4) panic I got on alpha and makes cisco HDLC mode actually work. More cleanup needs to be done post 3.9. OK brad@ looks good canacar@
2005-10-07Report interface link state changes in sppp layerCan Erkin Acar
Help and ok claudio@, ok brad@
2005-08-12Use actual packet contents when sending protocol rejects. Fixes PR 4305.Can Erkin Acar
Different fix tested by the submitter, xiangbo3 at gmail com. ok claudio@
2005-08-03prevent unaligned memory access when processing LCP echo packets,Can Erkin Acar
making pppoe(4) work on sparc64. Fixes PR-4311 Reported and fix tested by David Coppa < dcoppa at gmail com >
2005-06-08bye bye netns (and a few leftover DECNET bits while here)Henning Brauer
2005-05-13Fix for a panic experienced when authenticating a pppoe session on an amd64 ↵Brad Smith
system. From: i4b project via FreeBSD via Jason Ackley Fixes PR 4190 & 4196 ok canacar@
2005-04-24Fix cisco-mode check in lcp up/down.Can Erkin Acar
2005-04-11Ignore lcp up/down events in cisco modeCan Erkin Acar
2005-04-01do not mess with lcp if we are in cisco modeCan Erkin Acar
2005-03-24Unbreak tree, mono_time may no longer be used because of timecounters.Claudio Jeker
Use getmicrouptime() instead. Found by grange@ and henning@. OK henning@
2005-03-23Merge some sppp improvements from NetBSD:Can Erkin Acar
1. better timeout and keepalive handling 2. fix some memory leaks on error paths. 3. use arc4random instead of random 4. always send keepalives in cHDLC mode, from claudio@ Tested by Greg Mortensen (san) and jmc@ (pppoe), ok claudio@