summaryrefslogtreecommitdiff
path: root/src/network/networkd-manager.c
AgeCommit message (Collapse)Author
2014-05-16networkd: manager - read fallback DNS servers from config fileTom Gundersen
We will still use the compiled-in defaults if no DNS entry exists in the config file.
2014-05-16networkd: network - store DNS servers in List rather than SetTom Gundersen
This way we preserve the order of preference.
2014-05-16networkd: hardcode a set of default dns serversTom Gundersen
Similarly to NTP servers, this can be set at compile-time.
2014-05-12networkd: manager - don't leak kmod contextTom Gundersen
Also, keep the kmod_new internal to networkd-manager.c
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-11networkd: get preexiting addresses when a link is addedTom Gundersen
2014-05-10networkd: listen for address changesTom Gundersen
This is proof-of-concept only, as we only log the changes but don't do anything with it.
2014-05-10rtnl: change from bitmask to enum for rtnl groupsTom Gundersen
The bitmask is deprecated in the kernel, so move to the new interface. At the moment this does not make a difference for us, but it avoids having to change the API in the future.
2014-05-10networkd: manager - initialize variablesTom Gundersen
2014-05-10networkd: manager - refactor link tracking a bitTom Gundersen
2014-05-09networkd: manager - drop links and netdevs when we receive DELLINKTom Gundersen
2014-05-09networkd: introduce refcounting for Links and NetDevsTom Gundersen
2014-05-08sd-network: expose global operational stateTom Gundersen
2014-04-19networkd: manager - add a bit of debug output to udev ADD eventsTom 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-03-31networkd: rewind rtnl message between passing it to functionsTom Gundersen
This makes updating link status on netdev links work again.
2014-03-31networkd: fix use-after-freeTom Gundersen
Free networks before links (the reverse of creation order).
2014-03-28networkd: netdev - improve logging when setting ifindexTom Gundersen
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-20networkd: update mac address in clients when it changesTom Gundersen
Pass the mac address on to ipv4ll and dhcp clients so they always have up-to-date information, and may react appropriately to the change. Also drop setting the mac address from uevent, and only log when the address actually changes.
2014-03-14networkd: fix typoMichael Olbrich
It's HAVE_SPLIT_USR not HAVE_SPLIT_USER
2014-03-14networkd: allow more than one static DNS serverTom Gundersen
2014-03-14networkd: fix creation of runtime dirs at startupTom Gundersen
This allows us to drop the repeated attempted creations of the runtime dirs during runtime.
2014-03-06sd-rtnl/networkd: use new rtnl_message_read() API and drop helperTom Gundersen
With the new sd_rtnl_message_read_string(), there is no longer a need for rtnl_message_get_ifname().
2014-02-22networkd: handle SIGINT and SIGTERMTom 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-18networkd: refactor link_add() ↵Tom Gundersen
:( Don't set set **ret when returning r < 0, as matching on the errno may easily give false positives in the future leading to null pointer dereference. Reported-by: David Herrmann <dh.herrmann@gmail.com>
2014-02-13networkd: correctly handle manager_free(NULL)Tom Gundersen
2014-02-12networkd: work inside containersTom Gundersen
Udev does not run in containers, so instead of relying on it to tell us when a network device is ready to be used by networkd, we simply assume that any device was fully initialized before being added to the container.
2014-02-07networkd: netdev - rename Netdev to NetDevTom Gundersen
Both in the configuration file format and everywhere else in the code.
2014-02-07sd-dhcp-client: split sd_dhcp_lease from sd_dhcp_clientTom Gundersen
This allows us users of the library to keep copies of old leases. This is used by networkd to know what addresses to drop (if any) when the lease expires. In the future this may be used by DNAv4 and sd-dhcp-server.
2014-01-30networkd: netdev - reduce chance of race when receiving netdev's ifindexTom Gundersen
When creating a new link, the kernel will not inform us about the new ifindex in its ack. We have to listen for newly created devices and deduce the new ifindex by matching on the ifname. We used to do this by waiting for a new device from libudev, but that is asking for trouble, as udev will happily rename the device before handing it to us. Listen on rtnl instead, the chance of the name being changed before reaching us is much smaller (if not nil). Kernel patch in the works to make this unneccessary.
2014-01-22networkd: add basic bonding supportTom Gundersen
Refactor bridging support to be generic netdev support and extend it to cover bonding as well.
2014-01-18sd-dhcp-client/networkd: add domainname supportTom Gundersen
2014-01-18networkd: don't hard depend on system busTom Gundersen
We may not have a dbus daemon in the initrd (until we can rely on kdbus). In this case, simply ignore any attempts at using the bus. There is only one user for now, but surely more to come. In order to work reliably in the real root without kdbus, but at the same time don't delay boot when kdbus is in use, order ourselves after dbus.service.
2014-01-18networkd: resolv.conf - reword commentTom Gundersen
Take into account that users may want to use resolvconf(8), or similar. Also, avoid repeated calls to fputs().
2014-01-16networkd: resolv.conf - extend the comment a bitTom Gundersen
2014-01-16sd-dhcp-client: refactor DNS supportTom Gundersen
Rather than keeping an array of pointers to addresses, just keep an array of addresses.
2014-01-16sd-dhcp-client/networkd: add transient hostname supportTom Gundersen
2014-01-12networkd: fix wordingTom Gundersen
2014-01-12networkd: generate resolv.confTom Gundersen
This adds support to generate a basic resolv.conf in /run/systemd/network. This file will not take any effect unless a symlink is created from /etc/resolv.conf. Nameservers received over DHCP takes precedence over statically configured ones. Note: /etc/resolv.conf is severely limited, so in the future we will likely rather provide a much more powerfull nss plugin (or something to that effect), but this should allow current users to function without any loss of functionality.
2014-01-08No need to canonicalize fixed pathsZbigniew Jędrzejewski-Szmek
2014-01-03networkd: link hash uses 64, not 32 bit keysTom Gundersen
2014-01-03networkd: print the ifindex of added linksTom Gundersen
This debug information may be useful when comapring to dropped rtnetlink messages.
2014-01-03networkd: improve loggingTom Gundersen
This gives a bit better messages when a link is added twice.
2014-01-03networkd: add some debug info about notifications we ignoreTom Gundersen
2014-01-02networkd: only track state of links we are managingTom Gundersen
If a network is not (yet) set for a link, we do not care about its state (as we anyway don't know what to do with it).
2014-01-02networkd: improve loggingTom Gundersen
Remove redundant messages, add some debugging ones and make wording more uniform.
2013-12-18core,logind,networkd: check for udev device initialization via enumeration ↵Lennart Poettering
matches Instead of checking each device after we got it, check wuth an enumeration filter instead, to make it more efficient.
2013-12-18core,logind,networkd: don't pick up devices from udev before they finished ↵Lennart Poettering
udev initialization Managers shouldn't pick up the devices the manage before udev finished initialization, hence check explicitly for that.