summaryrefslogtreecommitdiff
path: root/sys/net/if_tun.c
AgeCommit message (Collapse)Author
2006-03-25allow bpf(4) to ignore packets based on their direction (inbound orDamien Miller
outbound), using a new BIOCSDIRFILT ioctl; guidance, feedback and ok canacar@
2006-03-20introduce rt_if_remove which takes care of routing table updates for anHenning Brauer
interface that is removed. use that from if.c and if_tun.c instead of re-implementing in the latter case. ok claudio
2006-03-16Switch tun(4) from encapsualting packets into a long mbuf chain over to useClaudio Jeker
mbuf clusters if the packet is big enough. This should speed up tun(4) and may help in other cases where long mbuf chains hurt. Additionally switch the default tun(4) MTU to a more sane 1500 bytes. TUNMTU is kept because it is used in userland. Input and OK from brad@ and djm@
2006-03-05change the interface type from IFF_POINTOPOINT to the more correctBrad Smith
type of IFF_TUNNEL (Encapsulation interface). ok djm@
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-01-11Do not use m_adj() on empty mbufs (m->m_len is uninitialised), instead bumpClaudio Jeker
m->m_data directly. This fixes the tun(4) / bridge(4) crash reported in PR4963. OK djm@ mpf@ markus@
2005-11-29something in the eurobsdcon route-a-thon broke my simple home networkJolan Luff
router so back out the routing stuff to pre-eurobsdcon where my machine doesn't crash immediately. i am happy to test diffs and report success/failures but i am not happy to have instantaneous crashes when i reboot with a new kernel that was compiled from pristine sources. if you are going to be an elitist asshole then you could at least make sure your code works. ok and "be crass towards them" deraadt@
2005-11-25move the code to delete routes having a specific interface as outputHenning Brauer
when the interface is deleted to a function in route.c, and replace the copies of that code by calls to that function from basel almost-hackathon
2005-11-21Move contents of sys/select.h to sys/selinfo.h in preparation for aTodd C. Miller
userland-visible sys/select.h. Consistent with what Net and Free do. OK deraadt@, tested with full ports build by naddy@.
2005-11-17tun devices get created (cloned) automagically when the device is opened.Henning Brauer
the code took a shortcut which results in the new device not beeing added to its interface class group as it should. call the regular if_clone_create() instead of taking shortcuts, and all is fine. ok markus, tested Mike Belopuhov <mkb@crypt.org.ru>
2005-11-16small doses of KNFHenning Brauer
2005-06-08huch, more netns shitzHenning Brauer
2005-06-08no more netns handling for the various tunnel devices and loopbackHenning Brauer
2005-05-04set RUNNING on open; from Alexey E. Suslikov; ok henning, claudioMarkus Friedl
2005-05-03typo, automaticaly -> automaticallyBrad Smith
2004-11-11Check IFF_UP at tun_output().Marco Pfatschbacher
ok henning, markus.
2004-11-09big KNF spanking, no change in object file, ecstatic ok from claudioHenning Brauer
2004-11-09use NULL instead of 0 for poiter comparisions,Henning Brauer
from "Alexey E. Suslikov" <cruel@texnika.com.ua> with a little help from itojun
2004-07-16remove netiso shitz, millert okHenning Brauer
2004-06-25Add tap aka layer 2 tunneling support to tun(4). It can be enabled by settingClaudio Jeker
the link0 flag via ifconfig(8). OK markus@, canacar@ also tested by ish@
2004-04-25check for input queue congestion on those as well and call if_congestion whenHenning Brauer
needed; these are slightly different so that we cannot use the new IF_INPUT_ENQUEUE macro deraadt ok
2004-03-02don't leak mbuf if uiomove fails; from netbsd;Markus Friedl
ok henning, cedric, claudio, deraadt
2004-01-12use klist_invalidate to permit destroy while kqueued. ok mpf@Ted Unangst
2004-01-05stop ifc_destroy() if there are still knotes registered.Marco Pfatschbacher
ok mcbride@ markus@
2003-12-16return error in ifc_destroy; ok deraadt, itojun, cedric, hshoexerMarkus Friedl
2003-12-10de-register. deraadt okJun-ichiro itojun Hagino
2003-12-06support destroy; ok henningMarkus Friedl
2003-12-03add support for ifconfig clone/destroy; ok henning deraadtMarkus Friedl
2003-12-02add kq support from wayne@epipe.com.au and cmaxwell@themanor.net (now that ↵Michael Shalayeff
regress test is there too)
2003-09-23Replace select backends with poll backends. selscan() and pollscan()Todd C. Miller
now call the poll backend. With this change we implement greater poll(2) functionality instead of emulating it via the select backend. Adapted from NetBSD and including some changes from FreeBSD. Tested by many, deraadt@ OK
2003-08-15change arguments to suser. suser now takes the process, and a flagsTed Unangst
argument. old cred only calls user suser_ucred. this will allow future work to more flexibly implement the idea of a root process. looks like something i saw in freebsd, but a little different. use of suser_ucred vs suser in file system code should be looked at again, for the moment semantics remain unchanged. review and input from art@ testing and further review miod@
2003-06-12in FIONREAD and FREAD, use IFQ_POLL instead of looking at if_snd.ifq_len /Henning Brauer
ifq_head, to make altq work. prevents programs from spinning in non-blocking select()/read() loops in case of queues hitting their limits. This makes queueing on tun interfaces work. while it is still advised to assign packets to queues on tunX and queue on the physical interface in generic, this doesn't work in the PPPoE case with the userland pppoe process, there the mbuf tags with the queue IDs don't survive obviously. based on diff from Trevor Talbot, tested successfully by a lot of people on the pf@benzedrine.cx list. ok pb@ kjc@
2003-05-03string fixes; tedu okTheo de Raadt
2003-04-18Add code to set the TUN_* flags for INET6 addresses too. This allows aJason Wright
tun with ipv6 only to actually send/recv packets. itojun "looks ok to me" (after helping correct several iterations =)
2003-01-07remove the altq classifier code which is replaced by pf and no longer used.Kenjiro Cho
ok henning@, deraadt@
2002-12-06Replace license with something that's actually free.Nathan Binkert
Approved by original author. Julian.Onions@nexor.co.uk
2002-06-30allocate sockaddr_dl for ifnet in if_alloc_sadl(), as we don't always knowJun-ichiro itojun Hagino
the size of sockaddr_dl on if_attach() - for instance, see ether_ifattach(). from netbsd. fgs ok
2002-06-06kqueue support for bpf; okay markus@Niels Provos
2002-03-14First round of __P removal in sysTodd C. Miller
2001-12-10use queue.h macros for TAILQ operationsJason Wright
2001-08-21Add support for SIOCADDMULTI & SIOCDELMULTI; NetBSDbrian
2001-08-03simplify previous fix (0-length mbuf in mbuf chain). from freebsdJun-ichiro itojun Hagino
2001-08-02do not exit loop even if m_len == 0. it is legal to have an mbuf withJun-ichiro itojun Hagino
m_len == 0 in mbuf chain.
2001-06-27introduce the ALTQ queue macros into sys/net files.Kenjiro Cho
the new model removes direct references to the fields in ifp->if_snd, and defines the following macros to manipulate ifp->if_snd. IFQ_ENQUEUE(ifq, m, pktattr, err) IFQ_DEQUEUE(ifq, m) IFQ_POLL(ifq, m) IFQ_PURGE(ifq) IFQ_IS_EMPTY(ifq) the new model also enforces some rules regarding how to use these macros. details are descrined in http://www.csl.sony.co.jp/~kjc/software/altq-new-design.txt
2001-06-15change the meaning of ifnet.if_lastchange to meet RFC1573 ifLastChange.Jun-ichiro itojun Hagino
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-05-16No need to check M_WAIT/M_WAITOK malloc return values. (art@ ok)Hakan Olsson
2001-04-23s = splimp(); ... s = splimp(); ... splx(x); ... splx(s); is a bad idea.Artur Grabowski
2001-03-05TUNSIFMODE ioctl (from NetBSD)Angelos D. Keromytis
2001-02-06allow configuring number of tunnel ifacesMichael Shalayeff
2000-12-05Change bpfattach() link layer type to DLT_LOOP making pcap generatedHugh Graham
bpf filters work on the tun interface. itojun@ approved.