summaryrefslogtreecommitdiff
path: root/src/network/networkd-address.c
AgeCommit message (Collapse)Author
2014-07-01networkd: address_acquire use cleanup macroSusant Sahani
use cleanup macro for Address na [tomegun: dropped unneccessary braces]
2014-06-29sd-dhcp-client/networkd: set lifetimes for IPv4 addressesPatrik Flykt
Note that /proc/sys/net/ipv4/ip_dynaddr needs to be non-zero. [tomegun: hook up DHCP renew events to increase the lifetime when necessary]
2014-06-18networkd: add address pool supportLennart Poettering
When an address is configured to be all zeroes, networkd will now automatically find a locally unused network of the right size from a list of pre-configured pools. Currently those pools are 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 and fc00::/7, i.e. the network ranges for private networks. They are compiled in, but should be configurable eventually. This allows applying the same configuration to a large number of interfaces with each time a different IP range block, and management of these IP ranges is fully automatic. When allocating an address range from the pool it is made sure the range is not used otherwise.
2014-05-19networkd/sd-network: expose statically configured NTP serversTom Gundersen
2014-05-17networkd: IP address equalityTom Gundersen
2014-05-16networkd: network - store DNS servers in List rather than SetTom Gundersen
This way we preserve the order of preference.
2014-05-16networkd: rename Address and Route list fieldsTom Gundersen
2014-04-03networkd: smooth transition from ipv4ll to dhcp addressUmut Tezduyar Lindskog
Currently when both ipv4ll and dhcp are enabled, ipv4ll address (if one has been claimed) is removed when dhcp address is aquired. This is not the best thing to do since there might be clients unaware of the removal trying to communicate. This patch provides a smooth transition between ipv4ll and dhcp. If ipv4ll address was claimed [1] before dhcp, address is marked as deprecated. Deprecated address is still a valid address and packets can be received on it but address cannot be selected as a source address. If dhcp lease cannot be extended, then ipv4ll address is marked as valid again. [1] If there is no collision, claiming IPv4LL takes between 4 to 7 seconds.
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-14networkd: allow more than one static DNS serverTom Gundersen
2014-03-03sd-network: IPv4 link-local support [v2]Umut Tezduyar Lindskog
Implements IPv4LL with respect to RFC 3927 (http://tools.ietf.org/rfc/rfc3927.txt) and integrates it with networkd. Majority of the IPv4LL state machine is taken from avahi (http://avahi.org/) project's autoip. IPv4LL can be enabled by IPv4LL=yes under [Network] section of .network file. IPv4LL works independent of DHCP but if DHCP lease is aquired, then LL address will be dropped. [tomegun: removed a trailing newline and a compiler warning]
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-18man: minor fixes to networkd pageTom Gundersen
Also enforce that we don't allow setting the Broadcast for IPv6 addresses.
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.
2014-02-13rtnl: rename constructors from the form sd_rtnl_xxx_yyy_new() to ↵Lennart Poettering
sd_rtnl_xxx_new_yyy() So far we followed the rule to always indicate the "flavour" of constructors after the "_new_" or "_open_" in the function name, so let's keep things in sync here for rtnl and do the same.
2014-02-13rtnl: drop "sd_" prefix from cleanup macrosLennart Poettering
The "sd_" prefix is supposed to be used on exported symbols only, and not in the middle of names. Let's drop it from the cleanup macros hence, to make things simpler. The bus cleanup macros don't carry the "sd_" either, so this brings the APIs a bit nearer.
2014-01-30networkd: address - add support for broadcastTom Gundersen
2014-01-30net-util: verify the address familyTom Gundersen
Error out if the address family is already set to something incompatible with the address being parsed.
2014-01-22sd-rtnl: simplify sd_rtnl_message_addr_new()Tom Gundersen
Split out into sd_rtnl_message_addr_set_{prefixlen,flags,scope}().
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-01networkd: distinguish between static and dynamic addresses/routesTom Gundersen
Static addresses/routes are associated with a network. Dynamic addresses/routes are associtade with links (as the corresponding network may be shared by several links).
2014-01-01network: add support for dropping addressTom Gundersen
2013-12-16rtnl: replace message_append by typesafe versionsTom Gundersen
2013-11-28networkd: fix several Address entries in [Network] sectionTom Gundersen
2013-11-26networkd: minor fixesTom Gundersen
In particular, store the ifname, though we should only use it carefully, as it is not guaranteed to be stable. Using it for logging is fine though.
2013-11-25delete unused variablesThomas Hindoe Paaboel Andersen
2013-11-25networkd: add support for [Address] sectionsTom Gundersen
This will allow specifying more options per address than the simple Address= entry in the [Network] section. Preliminary support for the same functionality for [Route] sections are added, but not yet hooked up, as more testing is needed.
2013-11-25conf-parser: distinguish between multiple sections with the same nameTom Gundersen
Pass on the line on which a section was decleared to the parsers, so they can distinguish between multiple sections (if they chose to). Currently no parsers take advantage of this, but a follow-up patch will do that to distinguish [Address] Address=192.168.0.1/24 Label=one [Address] Address=192.168.0.2/24 Label=two from [Address] Address=192.168.0.1/24 Label=one Address=192.168.0.2/24 Label=two
2013-11-17networkd: make all calls asyncTom Gundersen
2013-11-17networkd: store netmask and mac address explicitlyTom Gundersen
2013-11-13rtnl: rename rtnl_bus_send_with_reply_and_block() to rtnl_bus_call()Tom Gundersen
Follow the equivalent rename in sd-bus to stay as similar as possible.
2013-11-09networkd: add a basic network daemonTom Gundersen
This daemon listens for and configures network devices tagged with 'systemd-networkd'. By default, no devices are tagged so this daemon can safely run in parallel with existing network daemons/scripts. Networks are configured in /etc/systemd/network/*.network. The first .network file that matches a given link is applied. The matching logic is similar to the one for .link files, but additionally supports matching on interface name. The mid-term aim is to provide an alternative to ad-hoc scripts currently used in initrd's and for wired setups that don't change much (e.g., as seen on servers/and some embedded systems). Currently, static addresses and a gateway can be configured. Example .network file: [Match] Name=wlp2s0 [Network] Description=My Network Gateway=192.168.1.1 Address=192.168.1.23/24 Address=fe80::9aee:94ff:fe3f:c618/64