summaryrefslogtreecommitdiff
path: root/src/network
AgeCommit message (Collapse)Author
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.
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-30networkd: dhcpv4 - add notion of 'CriticalConnection'Tom Gundersen
These connections are never torn down, even when the DHCP specifications say that they should be. This is useful/necessary when the rootfs (or another critical fs) is mounted over this network connection, and dataloss would result if the connection is lost. This option defaults to off, but our initrd generator (TBD) will enable it when applicable.
2014-01-25networkd: improve logging a bitTom Gundersen
Fix/add some structured logging messages, and be uniform about when we WARN and ERR.
2014-01-25networkd: add basic VLAN supportTom Gundersen
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-22networkd: add basic bonding supportTom Gundersen
Refactor bridging support to be generic netdev support and extend it to cover bonding as well.
2014-01-22sd-rtnl: link - allow setting the change maskTom Gundersen
2014-01-19networkd: use 'up'/'down' rather than 'on'/'off'Tom Gundersen
2014-01-18networkd: dhcp - by default ignore the MTUTom Gundersen
2014-01-18sd-dhcp-client: refactor client_{free,new}Tom Gundersen
Make them more simiar to sd_bus and friends. Also factor out the event attachment. In the future, we will likely want to support external main-loops, so this is a first step. For the time being, we are still requiring an sd_event to be attached though.