CVSROOT:        /cvs
Module name:    src
Changes by:     d...@cvs.openbsd.org    2020/01/23 18:36:22

Modified files:
        sys/net        : if_tun.c 

Log message:
provide a tun_input() interface input handler for tun(4) packets.

this makes tun(4) more like tap(4). it now relies on the network
stack to set the rcvif, rdomain, count the packets, and lock
appropriately. right now it also means we consistently use if input
queues for both tun and tap, and return backpressure at the same
points.

the tun_input handler is then responsible for pulling the "link"
header off the packet and shoving it it into the various protocol
handlers as appropriate.

a consequence of having the stack count the bytes before tun_input
strips the header is ibytes now includes the 4 byte AF header.
however, this makes tun input consistent with the accounting on tun
output, which included those 4 bytes anyway.

Reply via email to