summaryrefslogtreecommitdiff
path: root/sys/net/ppp_tty.c
AgeCommit message (Collapse)Author
2022-12-21ppp: remove ioctls that never worked and crash the kernelchs
Remove vestigial bits of PPP HDLC support that never worked on netbsd. The TIOCRCVFRAME ioctl was apparently intended to be called only from within the kernel, but nothing prevents user code from calling this ioctl and crashing the kernel. Reported-by: syzbot+53e4620d0d17a4dd08fa@syzkaller.appspotmail.com Reported-by: syzbot+d3a8b784fed1e32e0768@syzkaller.appspotmail.com Reported-by: syzbot+375bab63345a6a7a3331@syzkaller.appspotmail.com Reported-by: syzbot+ba7ac85196274a20b54a@syzkaller.appspotmail.com Reported-by: syzbot+57ddb63a3d1d3299ef18@syzkaller.appspotmail.com
2022-10-26ppp(4): Convert to ttylock/ttyunlock.riastradh
2022-05-04fix various typos in comments and log messages.andvar
2021-12-13Use unsigned to avoid undefined behavior. Found by kUBSan.msaitoh
Reported-by: syzbot+699ce32cd32e2a670788@syzkaller.appspotmail.com
2021-09-27Use unsigned to avoid undefined behavior in pppasyncstart().msaitoh
Reported-by: syzbot+7c8c7977e2756ac13f0a@syzkaller.appspotmail.com
2020-01-29Adopt <net/if_stats.h>.thorpej
2019-09-20dedupmaxv
2019-01-24Add KERNEL_LOCK in ppptioctl() to protect struct ppp_softc members.knakahara
struct linesw.i_ioctl can be called without any preservation when the caller's struct cdevsw is set D_MPSAFE such as ucom(4).
2018-02-07ppprcvframe() has indentation issues.mrg
2016-10-02MFREE -> m_freechristos
2016-08-06Modularize the ppp driver, and adjust dependencies of the compressorpgoyette
modules. For now, this is still included as a built-in module in GENERIC kernels.
2016-06-20apply if_output_lock() to L3 callers which call ifp->if_output() of L2(or L3 ↵knakahara
tunneling).
2016-06-10Introduce m_set_rcvif and m_reset_rcvifozaki-r
The API is used to set (or reset) a received interface of a mbuf. They are counterpart of m_get_rcvif, which will come in another commit, hide internal of rcvif operation, and reduce the diff of the upcoming change. No functional change.
2015-08-24sprinkle _KERNEL_OPTpooka
2014-05-22Use accessor functions for the tty's table of control characters.dholland
(at least from outside the core tty sources) Move some xon/xoff code from net/ppp_tty.c to kern/tty.c.
2010-04-05Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpfjoerg
check into the inline functions as well the fourth argument for bpf_attach.
2010-01-19Redefine bpf linkage through an always present op vector, i.e.pooka
#if NBPFILTER is no longer required in the client. This change doesn't yet add support for loading bpf as a module, since drivers can register before bpf is attached. However, callers of bpf can now be modularized. Dynamically loadable bpf could probably be done fairly easily with coordination from the stub driver and the real driver by registering attachments in the stub before the real driver is loaded and doing a handoff. ... and I'm not going to ponder the depths of unload here. Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.
2009-05-07Introduce actions/requests to handle authorization for ppp(4), sl(4),elad
strip(4), btuart(4) and bcsp(4) network interfaces and devices. Mailing list reference: http://mail-index.netbsd.org/tech-kern/2009/04/27/msg004955.html
2009-04-15Remove a few KAUTH_GENERIC_ISSUSER in favor of more descriptiveelad
alternatives. Discussed on tech-kern: http://mail-index.netbsd.org/tech-kern/2009/04/11/msg004798.html Input from ad@, christos@, dyoung@, tsutsui@. Okay ad@.
2008-05-25Properly fix the "hanging in tty" bug that was worked around with cv_wakeup()ad
some time again.
2008-02-20s/u_\(int[0-9]*_t\)/u\1/gmatt
(change u_int*_t to uint*_t)
2007-11-28Grab tty_lock in more places. Noted and tested by degroote@.ad
2007-11-12Call ttwakeup() with tty_lock held.ad
2007-11-10Call ttyflush() with tty_lock held.ad
2007-11-07Merge tty changes from the vmlocking branch.ad
2007-03-04Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.christos
2007-01-04Consistent usage of KAUTH_GENERIC_ISSUSER.elad
2006-11-16__unused removal on arguments; approved by core.christos
2006-10-12- sprinkle __unused on function decls.christos
- fix a couple of unused bugs - no more -Wno-unused for i386
2006-07-23Use the LWP cached credentials where sane.ad
2006-05-14integrate kauth.elad
2005-12-11ANSI function decls and application of static.thorpej
2005-12-11merge ktrace-lwp.christos
2005-11-27Overhaul how TTY line disciplines are handled:thorpej
- Replace references to linesw[0] with a ttyldisc_default() function that returns the default ("termios") line discipline. - The linesw[] array is gone, replaced by a linked list. - ttyldisc_add() and ttyldisc_remove() have been replaced by ttyldisc_attach() and ttyldisc_detach(). - Things that provide line disciplines are now responsible for registering those disciplines with the system. The linesw structures are no longer declared in tty_conf.c - Line disciplines are now refcounted; a lookup causes a reference to be held. ttyldisc_release() releases the reference. Attempts to detach an in-use line discipline result in EBUSY. - Fix function signature lossage in if_sl.c, if_strip.c, and tty_tb.c that was masked by the old tty_conf.c - tty_init() is no longer necessary; delete it and its call from main().
2005-06-1130393/Miles Nordin: PF/ALTQ does not work on ppp(4) interfaceschristos
This is because the mbuf chain created did not have a header.
2005-05-29- sprinkle constchristos
- remove unneeded casts - use more mem*() instead of b*() funcs.
2005-05-17Yes, it was a cool trick >20 years ago to use "0123456789abcdef"[a] tochristos
implement, xtoa(), but I think defining the samestring 50 times is a bit too much. Defined HEXDIGITS and hexdigits in subr_prf.c and use it...
2005-02-26nuke trailing whitespaceperry
2003-09-01Add a new ioctl PPPIOCGRAWIN to get the last characters we got from thechristos
remote site.
2003-02-26Add MBUFTRACE kernel option.matt
Do a little mbuf rework while here. Change all uses of MGET*(*, M_WAIT, *) to m_get*(M_WAIT, *). These are not performance critical and making them call m_get saves considerable space. Add m_clget analogue of MCLGET and make corresponding change for M_WAIT uses. Modify netinet, gem, fxp, tulip, nfs to support MBUFTRACE. Begin to change netstat to use sysctl.
2002-09-06Merge the gehenna-devsw branch into the trunk.gehenna
This merge changes the device switch tables from static array to dynamically generated by config(8). - All device switches is defined as a constant structure in device drivers. - The new grammer ``device-major'' is introduced to ``files''. device-major <prefix> char <num> [block <num>] [<rules>] - All device major numbers must be listed up in port dependent majors.<arch> by using this grammer. - Added the new naming convention. The name of the device switch must be <prefix>_[bc]devsw for auto-generation of device switch tables. - The backward compatibility of loading block/character device switch by LKM framework is broken. This is necessary to convert from block/character device major to device name in runtime and vice versa. - The restriction to assign device major by LKM is completely removed. We don't need to reserve LKM entries for dynamic loading of device switch. - In compile time, device major numbers list is packed into the kernel and the LKM framework will refer it to assign device major number dynamically.
2002-07-01new copyright boilerplate from CMU. from openbsditojun
2002-03-17Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY foratatat
indicating an unhandled "command". ERESTART is -1, which can lead to confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been placed at -4. No ioctl code should now return -1 anywhere. The ioctl() system call is now properly restartable.
2002-03-05bring in latest ALTQ from kjc. ALTQify some of the drivers.itojun
2001-11-13remove unnecessary #if NFOO > 0 .... #endif wrapperslukem
2001-11-12add RCSIDslukem
2001-07-18bzero -> memsetthorpej
2001-06-14change the meaning of ifnet.if_lastchange to meet RFC1573 ifLastChange.itojun
follows BSD/OS practice and ucd-snmp code (FreeBSD does it for specific interfaces only). was: if_lastchange get updated on every packet transmission/receipt. now: if_lastchange get updated when IFF_UP is changed.
2001-03-31Remove unnecessary test of tp->t_linesw against NULL; they are resultsenami
of confusion while correcting compilation error after t_line is replaced with t_linesw.
2001-01-18constifyjdolecek