summaryrefslogtreecommitdiff
path: root/src/network/networkd-netdev.c
Commit message (Collapse)AuthorAge
* networkd: netdev - failing to create a netdev is not fatal, just fail that ↵Tom Gundersen2014-09-08
| | | | netdev
* networkd: netdev - add missing callback when adding stacked devicesTom Gundersen2014-08-19
| | | | | As the comment says, the passed in callback must always be invoked, or the underlying link will hang. This was missed when reworking the code, so add it back in.
* networkd: split out networkd-link.hTom Gundersen2014-08-12
|
* networkd: netdev - split NetDev struct into per-kind structsTom Gundersen2014-07-21
| | | | Similarly to how unit types work.
* sd-rtnl: make string returned by sd_rtnl_message_read_string() constLennart Poettering2014-07-18
|
* tty-ask-password-agent: modernizationZbigniew Jędrzejewski-Szmek2014-07-16
|
* Be more careful when checking for empty filesZbigniew Jędrzejewski-Szmek2014-07-16
| | | | | If we want to avoid reading a totally empty file, it seems better to check after we have opened the file, not before.
* Let config_parse open file where applicableZbigniew Jędrzejewski-Szmek2014-07-16
| | | | | | | | Special care is needed so that we get an error message if the file failed to parse, but not when it is missing. To avoid duplicating the same error check in every caller, add an additional 'warn' boolean to tell config_parse whether a message should be issued. This makes things both shorter and more robust wrt. to error reporting.
* Constify ConfigTableItem tablesZbigniew Jędrzejewski-Szmek2014-07-15
|
* networkd: netdev - introduce vtable for netdev kindsTom Gundersen2014-07-14
| | | | Split each netdev kind into its own .h/.c.
* networkd: netdev - rework load_oneTom Gundersen2014-07-14
| | | | | | | | We now: - parse config - match on environment - verify and complement config - create netdev
* networkd: netdev - split out bridge creationTom Gundersen2014-07-14
|
* networkd: netdev - rename 'enslave' to 'join'Tom Gundersen2014-07-14
| | | | | Enslave only really makes sense when referring to bridges and bonds, so try to be a bit more neutral.
* networkd: add support for modeSusant Sahani2014-07-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds supports networkd to configure bond mode during creation via persistent conf. Mode can be configured with conf param 'Mode'. A new section Bond is added to the conf to support bond mode. These modes can be configured now. balance-rr active-backup balance-xor broadcast 802.3ad balance-tlb balance-alb Example conf file: test-bond.conf [NetDev] Name=bond1 Kind=bond [Bond] Mode=balance-xor Test case: 1. start networkd service: 12: bond1: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default link/ether 22:89:6c:47:23:d2 brd ff:ff:ff:ff:ff:ff 2. find bond mode: cat /proc/net/bonding/bond1 Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011) Bonding Mode: load balancing (xor) Transmit Hash Policy: layer2 (0) MII Status: up MII Polling Interval (ms): 0 Up Delay (ms): 0 Down Delay (ms): 0 Changes: 1. Added file networkd-bond.c 2. Bond mode enum BondMode 3. conf section [Bond] [tomegun: whitespace]
* networkd: tuntap - default to no packet informationTom Gundersen2014-07-03
| | | | | | | Susant says: > ip tuntap turns this off by default. Let's follow ip(8) here as that should be the least surprising.
* networkd: tuntap - enable PacketInfo by defaultTom Gundersen2014-07-03
|
* networkd: netdev - move tunnel address parsing to networkd-tunnel.cTom Gundersen2014-07-03
|
* networkd: tunnels - make tunnel address parsing genericTom Gundersen2014-07-03
| | | | | It had a bug in the typing, fix that and also make it save the address family so we can print proper error messages.
* networkd: Introduce tun/tap deviceSusant Sahani2014-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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]
* networkd: netdev - drop the link callbacks after calling them onceTom Gundersen2014-07-03
| | | | We should never call them again, so make sure they are cleaned up correctly.
* networkd: netdev - take ref immediately after calling outTom Gundersen2014-07-03
| | | | Keeping the refcounting next to the sd_bus_call_async() makes it easier to check.
* networkd: split out vlan and macvlan handlingTom Gundersen2014-07-03
|
* networkd: netdev - add dummy supportTom Gundersen2014-07-01
|
* networkd: netdev - take ref when creating netdevsTom Gundersen2014-07-01
| | | | | We were doing this correctly for when the callback takes the Link object, but must also do it for the cases it takes the NetDev object.
* networkd: tunnel - ensure that enslave callback is always invokedTom Gundersen2014-07-01
| | | | | The Link statemachine relies on this, as it would otherwise wait forever. Hook up the tunnels in the same way as the other NetDev's.
* networkd: netdev add one separate lineSusant Sahani2014-07-01
|
* networkd: veth - fix creation of veth netdevTom Gundersen2014-06-20
| | | | Avoid freeing the netdev structure in the cleanup macro.
* networkd: veth - fix parsing verificationTom Gundersen2014-06-17
|
* networkd: vxlan - fix parsing verificationTom Gundersen2014-06-17
|
* networkd: veth - fix memleakTom Gundersen2014-06-17
|
* networkd: introduce vxlanSusant Sahani2014-06-16
| | | | | | | | | | | | | | This patch enables netwokd to create vxlan Changes: Added: 1. File networkd networkd-vxlan.c 2. to netdev bool learning struct in_addr group uint64_t vxlanid; 3. VXLAN subsection and config parameters
* Revert "Revert "networkd: netdev - set predictable mac address when creating ↵Tom Gundersen2014-06-14
| | | | | | | | | | | netdev"" This reverts (and rewrites) commit 7d95c772cba1836545459760273b13f2e01dd2a8. The issue blocking this feature has now been fixed in the kernel, and backported to the various stable kernels. Our netdevs will now have stable MAC addresses, even if one is not specified.
* networkd: netdev - allow setting MACAddress in .netdev filesTom Gundersen2014-06-14
| | | | | | It may sometimes be necessary to specify the MAC address of a netdev. Let us set the correct one from the get-go, rather than having the kernel generate a random one, and then change it after.
* networkd: introduce vti tunnelSusant Sahani2014-06-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch enables vti tunnel support. example conf: file : vti.netdev [NetDev] Name=vti-tun Kind=vti MTUBytes=1480 [Tunnel] Local=X.X.X.X Remote=X.X.X.X file: vti.network [Match] Name=em1 [Network] Tunnel=vti-tun TODO: Add more attributes for vti tunnel IFLA_VTI_IKEY IFLA_VTI_OKEY
* networkd: sit-tunnel add support for pmtudiscSusant Sahani2014-06-02
| | | | | | | | | | | | | | | | | | | | | | This patch adds path of mtu discovery for sit tunnel. To enable/disable DiscoverPathMTU is introduced. Example configuration file: sit.netdev [NetDev] Name=sit-tun Kind=sit MTUBytes=1480 [Tunnel] DiscoverPathMTU=1 Local=X.X.X.X Remote=X.X.X.X By default pmtudisc is turned on , if DiscoverPathMTU is missing from the config. To turn it off DiscoverPathMTU=0 needs to be set.
* networkd-netdev: fix white spaceSusant Sahani2014-06-02
|
* networkd: introduce veth device supportSusant Sahani2014-06-02
| | | | | | | | | | | | | | | This patch adds veth device support to networkd. Example conf: File: veth.netdev [NetDev] Name=veth-test Kind=veth [Peer] Name=veth-peer
* networkd: fix typoTom Gundersen2014-05-16
|
* networkd: logging - align messagesTom Gundersen2014-05-15
|
* networkd: log ifindices when links and netdevs are addedTom Gundersen2014-05-15
|
* networkd: rename NetDev variable for consistency with LinkTom Gundersen2014-05-15
|
* networkd: introduce ipip tunnelSusant Sahani2014-05-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch enables basic ipip tunnel support. It works with kernel module ipip example conf: file: ipip.netdev [NetDev] Name=ipip-tun Kind=ipip MTUBytes=1480 [Tunnel] Local=192.168.223.238 Remote=192.169.224.239 TTL=64 file: ipip.network [Match] Name=em1 [Network] Tunnel=ipip-tun [tomegun: - drop unused variable - take ref when enslaving]
* networkd: netdev - rephrase logging message a bitTom Gundersen2014-05-10
| | | | Make it fit with what is logged from the link.
* networkd: netdev - drop if creation failsTom Gundersen2014-05-09
| | | | This ensures that all links waiting to be enslaved are notified that the netdev does not exist.
* networkd: link - introduce LINGER state and link_drop()Tom Gundersen2014-05-09
| | | | We need the LINGER state in case we still have references to the link after it has been dropped.
* networkd: netdev - introduce LINGER state and netdev_drop()Tom Gundersen2014-05-09
| | | | We need the LINGER state in case we still have references to the netdev after it has been dropped.
* networkd: netdev - cancel all callbacks when freeingTom Gundersen2014-05-09
| | | | This notifies the link that the netdev no longer exists.
* networkd: link - take refcounts on linksTom Gundersen2014-05-09
| | | | | | We need to take a refcount on the link whenever we expect a callback. The exceptions are the ipv4ll/dhcp clients as their lifetimes are guaranteed to be shorter than that of the link.
* networkd: introduce refcounting for Links and NetDevsTom Gundersen2014-05-09
|
* networkd: netdev - log when loading a .netdev fileTom Gundersen2014-04-28
|