summaryrefslogtreecommitdiff
path: root/src/network/networkd-link.c
AgeCommit message (Collapse)Author
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-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-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.
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-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-16networkd: dhcp - only set the MTU option onceTom Gundersen
Only set MTU request when creating the dhcp client, not every time it is restarted.
2014-01-16networkd: link - only save original MTU when necessaryTom Gundersen
2014-01-16networkd: improve loggingTom Gundersen
2014-01-16sd-dhcp-client/networkd: add interface MTU supportTom Gundersen
2014-01-13networkd: DHCPv4 - allow opting out of using DNS serversTom Gundersen
Setting UseDNS=no will ignore any received DNS servers.
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-12networkd: improve logging a bitTom Gundersen
2014-01-11network: use GNU-ism to simplify macrosZbigniew Jędrzejewski-Szmek
Thanks David!
2014-01-08networkd: print the received DHCPv4 address and gatewayZbigniew Jędrzejewski-Szmek
It seems that networkd stores in_addr.s_addr contents in reverse order (little-endian, not network order). This is a bit confusing, but sd_rtnl evidently likes this order.
2014-01-08networkd: use structured logging for links and bridgesZbigniew Jędrzejewski-Szmek
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: improve link state change loggingTom Gundersen
2014-01-03networkd: link - explicitly set the link to be up if the call to IFF_UP succeedsTom Gundersen
No need to wait for the NEWLINK message to arrive.
2014-01-03networkd: dhcp - avoid null pointer dereferenceTom Gundersen
2014-01-03networkd: add more asserts and ignore all events when link has failedTom 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.
2014-01-02networkd: fix NULL pointer derefKay Sievers
2014-01-02networkd: fix getting initial stateTom Gundersen
We were requesting the state and then ignoring it...
2014-01-01networkd: add DHCPv4 supportTom Gundersen
This adds basic DHCPv4 support. Link-sense is enabled unconditionally, but the plan is to make that configurable. I tested this in a VM with lots of NICs and over wifi in the various coffee shops I found this Christmas, but more testing would definitely be appreciated.
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).
2013-12-17networkd: link - remove useless statesTom Gundersen
Rework the state-machine a bit.
2013-12-17networkd: rename link_update_flags to link_updateTom Gundersen
We are likely to track more than the flags in the future.
2013-12-17networkd: correct logging messageTom Gundersen
2013-12-16network: use SETLINK to bring up interfacesTom Gundersen
2013-12-16rtnl: simplify link_new()Tom Gundersen
Drop most of the arguments and instead introduce link_set_{flags,type}.
2013-12-04networkd: add link-sense and simplify state-machine a bitTom Gundersen
This listens to rtnetlink for changes to IFF_UP and IFF_LOWER_UP (link sense). The latter is simply logged at the moment, but will be useful once we add dhcp support.
2013-11-26networkd: add bridge supportTom Gundersen
A bridge is specified in a .netdev file with a section [Bridge] and at least the entry Name=. A link may be joined to a bridge if the .network applied to it has a Bridge= entry giving the name of the bridge in its [Network] section. We eagerly create all bridges on startup, and links are added to bridges as soon as they both appear.
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-25networkd: use correct printf formatterDave Reisner
uint64_t can be formatted correctly with %ju, rather than casting to unsigned and potentially losing accuracy.
2013-11-21networkd: make sure Network and Link can always be freedTom Gundersen
Also, don't fail a link just because we can't find its MAC address.
2013-11-21networkd: avoid segfaultTom Gundersen
2013-11-19networkd: make sure Links and Networks are freedTom Gundersen
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