Age | Commit message (Collapse) | Author |
|
Move calling ether_ioctl() from the top of the ioctl function, which
at the moment does absolutely nothing, to the default switch case.
Thus allowing drivers to define their own ioctl handlers and then
falling back on ether_ioctl(). The only functional change this results
in at the moment is having all Ethernet drivers returning the proper
errno of ENOTTY instead of EINVAL/ENXIO when encountering unknown
ioctl's.
Shrinks the i386 kernels by..
RAMDISK - 1024 bytes
RAMDISKB - 1120 bytes
RAMDISKC - 832 bytes
Tested by martin@/jsing@/todd@/brad@
Build tested on almost all archs by todd@/brad@
ok jsing@
|
|
do not count address family field twice in tun's if_obytes stats.
ok henning@ reyk@ deraadt@ for the ethernet bits.
ok deraadt@ for the tun bits.
|
|
Also move the sampling into ether_input() where it can happen
at the interrupt and not within splnet() processing, which might
be less random. Discussed with mickey.
OK markus@, mcbride@
|
|
using M_PREPEND checks for NULL after the invocation. So check
here too and return ENOBUFS if NULL is detected.
ok henning@
|
|
ok claudio@ krw@ jason@ dlg@
|
|
-remove useless casts
-MALLOC/FREE -> malloc/free
-use M_ZERO where appropriate instead of seperate bzero
feedback & ok krw, hshoexer
|
|
|
|
|
|
oustside, seqencer, toghether, nessissary, etc.
|
|
It shouldn't make a difference, but some
ioctl-callers don't initialize the ifreq properly.
Fixes a panic w/ tun(4) on trunk(4).
OK reyk@, claudio@
|
|
Don't allow the userland to fiddle with flags reserved by the driver.
Noticed by Ingo Schwarze.
|
|
via TUNSIFINFO. ppp(8) was happily clearing the RUNNING flag and so all
incomming packets where dropped. Issue reported by irix <at> ukr <dot> net.
While there check that the mtu is in a valid range -- stolen from SIOCSIFMTU
case.
|
|
- if the interface was auto-created by opening a /dev/tun* device it will
auto-destroy on close. This is comparable to ifconfig tun0 destroy and
will remove all routes and addresses associated with the interface.
- if the interface was created by ifconfig(8) or hostname.if(5) the interface
is persistent -- it is just marked as not running. Especially routes are no
longer removed when the interface is closed. This is useful for static
setups like the server side of a ssh vpn or static qemu session.
This behaviour is more logic then the half done cleanup that is currently done.
OK mpf@
|
|
these flags on close. OK mpf@
|
|
|
|
from alexandre ratchov. ok claudio
|
|
outbound), using a new BIOCSDIRFILT ioctl;
guidance, feedback and ok canacar@
|
|
interface that is removed. use that from if.c and if_tun.c instead of
re-implementing in the latter case. ok claudio
|
|
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@
|
|
type of IFF_TUNNEL (Encapsulation interface).
ok djm@
|
|
the remainder of the network stack from splimp to splnet.
ok miod@
|
|
m->m_data directly. This fixes the tun(4) / bridge(4) crash reported in
PR4963. OK djm@ mpf@ markus@
|
|
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@
|
|
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
|
|
userland-visible sys/select.h. Consistent with what Net and Free do.
OK deraadt@, tested with full ports build by naddy@.
|
|
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>
|
|
|
|
|
|
|
|
|
|
|
|
ok henning, markus.
|
|
|
|
from "Alexey E. Suslikov" <cruel@texnika.com.ua> with a little help from itojun
|
|
|
|
the link0 flag via ifconfig(8). OK markus@, canacar@ also tested by ish@
|
|
needed; these are slightly different so that we cannot use the new
IF_INPUT_ENQUEUE macro
deraadt ok
|
|
ok henning, cedric, claudio, deraadt
|
|
|
|
ok mcbride@ markus@
|
|
|
|
|
|
|
|
|
|
regress test is there too)
|
|
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
|
|
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@
|
|
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@
|
|
|
|
tun with ipv6 only to actually send/recv packets. itojun "looks ok to me"
(after helping correct several iterations =)
|