summaryrefslogtreecommitdiff
path: root/src/network/networkd-netdev.c
AgeCommit message (Collapse)Author
2014-07-03networkd: split out vlan and macvlan handlingTom Gundersen
2014-07-01networkd: netdev - add dummy supportTom Gundersen
2014-07-01networkd: netdev - take ref when creating netdevsTom Gundersen
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.
2014-07-01networkd: tunnel - ensure that enslave callback is always invokedTom Gundersen
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.
2014-07-01networkd: netdev add one separate lineSusant Sahani
2014-06-20networkd: veth - fix creation of veth netdevTom Gundersen
Avoid freeing the netdev structure in the cleanup macro.
2014-06-17networkd: veth - fix parsing verificationTom Gundersen
2014-06-17networkd: vxlan - fix parsing verificationTom Gundersen
2014-06-17networkd: veth - fix memleakTom Gundersen
2014-06-16networkd: introduce vxlanSusant Sahani
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
2014-06-14Revert "Revert "networkd: netdev - set predictable mac address when creating ↵Tom Gundersen
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.
2014-06-14networkd: netdev - allow setting MACAddress in .netdev filesTom Gundersen
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.
2014-06-02networkd: introduce vti tunnelSusant Sahani
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
2014-06-02networkd: sit-tunnel add support for pmtudiscSusant Sahani
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.
2014-06-02networkd-netdev: fix white spaceSusant Sahani
2014-06-02networkd: introduce veth device supportSusant Sahani
This patch adds veth device support to networkd. Example conf: File: veth.netdev [NetDev] Name=veth-test Kind=veth [Peer] Name=veth-peer
2014-05-16networkd: fix typoTom Gundersen
2014-05-15networkd: logging - align messagesTom Gundersen
2014-05-15networkd: log ifindices when links and netdevs are addedTom Gundersen
2014-05-15networkd: rename NetDev variable for consistency with LinkTom Gundersen
2014-05-12networkd: introduce ipip tunnelSusant Sahani
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]
2014-05-10networkd: netdev - rephrase logging message a bitTom Gundersen
Make it fit with what is logged from the link.
2014-05-09networkd: netdev - drop if creation failsTom Gundersen
This ensures that all links waiting to be enslaved are notified that the netdev does not exist.
2014-05-09networkd: link - introduce LINGER state and link_drop()Tom Gundersen
We need the LINGER state in case we still have references to the link after it has been dropped.
2014-05-09networkd: netdev - introduce LINGER state and netdev_drop()Tom Gundersen
We need the LINGER state in case we still have references to the netdev after it has been dropped.
2014-05-09networkd: netdev - cancel all callbacks when freeingTom Gundersen
This notifies the link that the netdev no longer exists.
2014-05-09networkd: link - take refcounts on linksTom Gundersen
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.
2014-05-09networkd: introduce refcounting for Links and NetDevsTom Gundersen
2014-04-28networkd: netdev - log when loading a .netdev fileTom Gundersen
2014-04-21Revert "networkd: netdev - set predictable mac address when creating netdev"Tom Gundersen
This reverts commit cdc85c875b842b9309f72caefc51c262f521cf92. There appears to be a kernel bug that (among other things) cause bridges not to get a bridge id set when supplying IFLA_ADDRESS when creating the netdev. Simply revert the whole thing until we sort this out in the kernel. See: http://www.spinics.net/lists/netdev/msg279807.html Reported-by: C. R. Oldham <cr@saltstack.com>
2014-04-19network: implement masking of .link, .network and .netdev filesTom Gundersen
2014-04-19networkd: netdev - give up early when setting already set ifindexTom Gundersen
We may receive RTM_NEWLINK messages with missing LINKINFO after the initial NEWLINK message, don't bother verifying these, just drop out early after checking that the ifindex is not in conflict.
2014-04-19networkd: netdev - verify name of newlink messagesTom Gundersen
2014-04-19networkd: netdev - set predictable mac address when creating netdevTom Gundersen
2014-04-19networkd: tie links to rtnl rather than udevTom Gundersen
This essentially swaps the roles of rtnl and udev in networkd. After this change libudev is only used for waiting for udev to initialize devices and to get udev-specific information needed for some [Match] attributes. This in particular simplifies the code in containers where udev is not really useful, but also simplifies things and reduces round-trips in the non-container case.
2014-04-05Fix a few return codes in error pathsZbigniew Jędrzejewski-Szmek
2014-03-28networkd: netdev - improve logging when setting ifindexTom Gundersen
2014-03-28sd-rtnl: rework rtnl type systemTom Gundersen
Use a static table with all the typing information, rather than repeated switch statements. This should make it a lot simpler to add new types. We need to keep all the type info to be able to create containers without exposing their implementation details to the users of the library. As a freebee we verify the types of appended/read attributes. The API is extended to nicely deal with unions of container types.
2014-03-24networkd: fix a couple of memory leaksLennart Poettering
2014-03-24networkd: netdev - fix error handling in set_ifindex()Tom Gundersen
Firstly, remove stray assert(). Also be a bit stricter when verifying the received info. If we get an applicable newlink message that we can't make sense of, we will now enter NETDEV_FAILED, as we cannot reasonably continue without knowing the ifindex of our device.
2014-03-24networkd: netdev - verify that newlink messages has the expected kindTom Gundersen
We match 'newlink' messages with expected netdev's based on their names. Now also make sure that the receieved link has the expected kind.
2014-03-21libsystemd-network: move network-utils from src/sharedTom Gundersen
This does not belong in shared as it is mostly a detail of our networking subsystem. Moreover, now we can use libudev here, which will simplify things.
2014-03-15networkd: netdev - support joining already existing netdevsTom Gundersen
2014-03-07Make tables for DEFINE_STRING_TABLE_LOOKUP consistentDaniel Mack
Bring some arrays that are used for DEFINE_STRING_TABLE_LOOKUP() in the same order than the enums they reference. Also, pass the corresponding _MAX value to the array initalizer where appropriate.
2014-02-25networkd: add basic support for MACVLANsTom Gundersen
2014-02-21net-util: match on the driver as exposed by ethtool if DRIVER not setTom Gundersen
Also fix a copy-paste error that broke matching on interface name.
2014-02-21.network/.netdev/.link: allow to match on architectureTom Gundersen
2014-02-20networkd: netdev - allow filtering on kernel cmdline, host and virtTom Gundersen
2014-02-20api: in constructor function calls, always put the returned object pointer ↵Lennart Poettering
first (or second) Previously the returned object of constructor functions where sometimes returned as last, sometimes as first and sometimes as second parameter. Let's clean this up a bit. Here are the new rules: 1. The object the new object is derived from is put first, if there is any 2. The object we are creating will be returned in the next arguments 3. This is followed by any additional arguments Rationale: For functions that operate on an object we always put that object first. Constructors should probably not be too different in this regard. Also, if the additional parameters might want to use varargs which suggests to put them last. Note that this new scheme only applies to constructor functions, not to all other functions. We do give a lot of freedom for those. Note that this commit only changes the order of the new functions we added, for old ones we accept the wrong order and leave it like that.
2014-02-18sd-rtnl-message: store reference to the bus in the messageTom Gundersen
This mimics the sd-bus api, as we may need it in the future.