chiark / gitweb /
networkd: Introduce tun/tap device
authorSusant Sahani <susant@redhat.com>
Thu, 3 Jul 2014 08:04:11 +0000 (13:34 +0530)
committerTom Gundersen <teg@jklm.no>
Thu, 3 Jul 2014 09:00:02 +0000 (11:00 +0200)
commit30ae9dfda3788cdfaf1b84d124dbc7feb638c77b
tree854a45b96eb6cd48b9b2caed95a1ecb23de7b2ed
parent866ee3682213789f85b877700457fdca05695a0e
networkd: Introduce tun/tap device

This patch introduces TUN/TAP device creation support
to networkd.

Example conf to create a tap device:

file: tap.netdev
------------------
[NetDev]
Name=tap-test
Kind=tap

[Tap]
OneQueue=true
MultiQueue=true
PacketInfo=true
User=sus
Group=sus
------------------

Test:
1. output of ip link
tap-test: tap pi one_queue UNKNOWN_FLAGS:900 user 1000 group 1000

id:
uid=1000(sus) gid=10(wheel) groups=10(wheel),1000(sus)
context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

Modifications:

Added:
1. file networkd-tuntap.c
3. netdev kind NETDEV_KIND_TUN and NETDEV_KIND_TAP
2. Tun and Tap Sections and config params to parse
   conf and gperf conf parameters

[tomegun: tweak the 'kind' checking for received ifindex]
Makefile.am
man/systemd.netdev.xml
src/network/networkd-netdev-gperf.gperf
src/network/networkd-netdev.c
src/network/networkd-tuntap.c [new file with mode: 0644]
src/network/networkd.h