summaryrefslogtreecommitdiff
path: root/sys/net/if_spppsubr.c
AgeCommit message (Collapse)Author
2012-11-23Add SIOCGIFHARDMTU to allow retrieving the driver's maximum supported MTUStuart Henderson
looks fine reyk@ ok mikeb@
2012-07-24decls before codeTheo de Raadt
2012-07-23Call sppp_clear_ip_addrs from a workq. Problem reported by RD Thrush andStuart Henderson
LEVAI Daniel, diagnosed by matthew@, original diff from RD Thrush, cleaned up by me with feedback from mikeb@. OK mikeb dcoppa deraadt
2012-01-28Remove a horrible sppp(4)-specific "fast queue" used for tcp ports 21 23 513.Stuart Henderson
You should use the proper queues via pf instead. ok phessler@ henning@
2012-01-19Teach pppoe(4) about RFC 4638. This allows negotiating increased MTU withStuart Henderson
compatible equipment provided that the physical interface and other layer 2 devices involved support and are configured to use jumbo frames. Manpage to follow; typical use is to request 1500 MTU for pppoe, this requires 1508+ MTU on the physical interface, e.g. "ifconfig em0 mtu 1508; ifconfig pppoe0 mtu 1500". Known to be usable in the UK with some ISPs (e.g. aaisp) using BT FTTC backhaul. From Matt Dainty, originally based on support in NetBSD, changed to decouple pppoe from physical interface MTU. Tested with UK FTTC by Matt, no regressions on my standard UK ADSL setup or yasuoka@'s setup (in Japan, NTT uses 1452 byte MTU for PPPoE and 1500 byte MTU for IPv6 on the same network). ok yasuoka@
2011-07-07another case of "clever" fiddling with ifq internals, just stumbled overHenning Brauer
this in my monster diff and wondered that i hadn't put that in already... claudio ryan ok
2011-07-06and make sppp_qflush a wrapper around IF_PURGE instead of handrollingHenning Brauer
the same, ok'd with IFQ_PURGE with happens to break on altq kernels by claudio, ryan and bluhm
2011-07-06second trial: stop messing with ifq internals, this time use IF_IS_EMPTYHenning Brauer
and not IFQ_IS_EMPTY, the former doesn't get overloaded with altq-specific stuffz. original oks from claudio and ryan and bluhm, i take the liberty to assume the oks for this fixed version
2011-07-06cosnistently use IFQ_SET_MAXLEN, surfaced in a discussion with + ok bluhmHenning Brauer
2011-07-05Revert henning's commit-n-run that broke the treePhilip Guenthe
2011-07-052 cases of IFQ_IS_EMPTY instead of mucking with ifqueue internalsHenning Brauer
make sppp_flush use IFQ_PURGE instead of handrolling the same making assumptions about ifqueue internals. ok ryan claudio
2011-06-29always set sppp auth secret, as other code assumes it.Ted Unangst
confirmed to fix paul stoeber's crash. ok deraadt sthen
2011-06-18pass the correct size to memsetJonathan Gray
spotted by clang, ok matthew@
2011-05-04Collapse m_pullup and m_pullup2 into a single function, as they'reBret Lambert
essentially identical; the only difference being that m_pullup2 is capable of handling mbuf clusters, but called m_pullup for shorter lengths (!). testing dlg@ ok claudio@
2011-04-17in_ifinit() is not prepared to be called from interrupt context so addStefan Sperling
addresses from process context by scheduling a work queue. Fixes an assertwaitok panic. ok henning
2011-01-11for key material that is being being discarded, convert bzero() toTheo de Raadt
explicit_bzero() where required ok markus mikeb
2010-11-17an extra parameter for in_ifinit, indicating wether the ifaddr passed to itHenning Brauer
is new or an already existing one. for existing ones, call ifa_del first tested by many as part of a larger diff, ok claudio dlg krw sthen
2010-09-13Using a normaly unavailable 0.0.0.1 gateway on routes on sppp(4) basedClaudio Jeker
devices is a bad idea. The problem is that the default route per se works but PMTU is unable to clone host routes because the gateway is unreachable. Fix sppp(4) so that it walks the routing table and fixes the gateways. This makes PMTU work again. Diff tested by weerd@ and markus@ (older version) for a long time.
2010-07-20Switch some obvious network stack MAC comparisons from bcmp() toMatthew Dempsky
timingsafe_bcmp(). ok deraadt@; committed over WPA.
2010-05-01incomming -> incomingMichael Knudsen
The ones found in gnu/ left out by intention. ok jmc
2010-02-08The IMPs are history so is splimp, this needs now splnet so update comment.Claudio Jeker
Another thing found by Gleydson Soares.
2009-11-03rtables are stacked on rdomains (it is possible to have multiple routingClaudio Jeker
tables on top of a rdomain) but until now our code was a crazy mix so that it was impossible to correctly use rtables in that case. Additionally pf(4) only knows about rtables and not about rdomains. This is especially bad when tracking (possibly conflicting) states in various domains. This diff fixes all or most of these issues. It adds a lookup function to get the rdomain id based on a rtable id. Makes pf understand rdomains and allows pf to move packets between rdomains (it is similar to NAT). Because pf states now track the rdomain id as well it is necessary to modify the pfsync wire format. So old and new systems will not sync up. A lot of help by dlg@, tested by sthen@, jsg@ and probably more OK dlg@, mpf@, deraadt@
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@