summaryrefslogtreecommitdiff
path: root/src/network
AgeCommit message (Collapse)Author
2014-03-11networkd: rework startupTom Gundersen
Open all listenerns before loading configuration.
2014-03-09network: link - simplify code a bit and remove some debug loggingTom Gundersen
2014-03-08networkd: fix confusion from missing bracesZbigniew Jędrzejewski-Szmek
Fixup for 76800848f281c3 'networkd: link - degrade failed UP to warning'.
2014-03-08networkd: link - degrade failed UP to warningTom Gundersen
Something else may still bring the link up, so don't enter failed state prematurely.
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-03-07networkd: use new rtnl_message_read() APITom Gundersen
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-03-05networkd: listen to changes to the MAC addressTom Gundersen
Bridges will change their MAC address when other devices are enslaved. We need the correct MAC address to acquire a DHCP lease, so take note of it whenever it changes.
2014-03-05networkd: restore logic for enslaving to a master bonding interfaceMark Oteiza
This partially reverts commit 54abf46, which unintentionally removed the enslaving support for bonding interfaces
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-03-03networkd: wait-online - fix typoTom Gundersen
2014-03-01networkd-wait-online: use automatic cleanupThomas Hindoe Paaboel Andersen
2014-02-28sd-network: turn states 'unknown' and 'unmanaged' into errnosTom Gundersen
2014-02-28networkd: add networkd-wait-onlineTom Gundersen
This is mostly a proof of concept to try sd-network, so we don't hook it up with a .service file quite yet. We probably want it to be more clever about deciding when we are 'online'. The binary will wait for at least one network managed by networkd, and until all networks managed by networkd are configured.
2014-02-28sd-network: add new libraryTom Gundersen
This is similar to sd-login, but exposes the state of networkd rather than logind. Include it in libsystemd-dhcp and rename it to libsystemd-network.
2014-02-25networkd: add basic support for MACVLANsTom Gundersen
2014-02-22networkd: handle SIGINT and SIGTERMTom Gundersen
2014-02-22test: always use assert_se in testsTom 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-20network/link: Match - filter 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-19make gcc shut upLennart Poettering
If -flto is used then gcc will generate a lot more warnings than before, among them a number of use-without-initialization warnings. Most of them without are false positives, but let's make them go away, because it doesn't really matter.
2014-02-19networkd: dhcp - log when lease is lostTom Gundersen
2014-02-19networkd: link - only reset transient hostname if it was set by usTom Gundersen
2014-02-18net-match: fix Driver= matchTom Gundersen
It should match on the driver of the parent device.
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-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-17networkd: act on lease only if there is oneUmut Tezduyar Lindskog
Interface could go down before acquiring a dhcp lease
2014-02-15sd-rtnl: always include linux/rtnetlink.hTom Gundersen
2014-02-15sd-rtnl: message_open_container - don't take a 'size' argumentTom Gundersen
We can always know the size based on the type, so let's do this inside the library.
2014-02-13rtnl: support adding VETH_INFO_PEER containers into rtnl messagesLennart Poettering
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-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-10networkd: link - correctly skip state ENSLAVING when no vlans configuredTom Gundersen
This fixes a regression introduced in 672682a6b
2014-02-10networkd: VLAN - allow multiple vlans to be created on a linkTom Gundersen
Also limit the range of vlan ids. Other implementations and documentation use the ranges {0,1}-{4094,4095}, but we use the one accepted by the kernel: 0-4094. Reported-by: Oleksii Shevchuk <alxchk@gmail.com>
2014-02-10networkd: fix setting dns from dhcpTom Gundersen
2014-02-07remove unused variablesThomas Hindoe Paaboel Andersen
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-02-01networkd: remove unused variableTom Gundersen
2014-02-01networkd: don't fail on DHCP errorsTom Gundersen
2014-01-31networkd: dhcp - refactor handlerTom Gundersen
2014-01-31networkd: don't check for ifindex in answer to RTM_NEWLINKTom Gundersen
The kernel will not be changed to support this, so drop the code. Listening for all RTM_NEWLINK messages and filtering on name is reliable, so it is not a problem.
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-30sd-dhcp-client/net-util: make netmask_to_prefixlen genericTom Gundersen
This was originally included in the dhcp-client at my request, but it is not really dhcp-specific and useful outside of it, so let's pull it out.