summaryrefslogtreecommitdiff
path: root/src/network/networkd-link.c
Commit message (Collapse)AuthorAge
* networkd: link - drop assert from _free()Tom Gundersen2014-07-01
| | | | _free() should always succeed, even if object is not fully allocated.
* networkd: link - improve refcountingTom Gundersen2014-07-01
| | | | | | | We failed to take a ref when waiting for udev synchronization. Fix that and also make unreffing in callbacks simpler throughout by using _cleanup_ macros. Fixes <https://bugs.freedesktop.org/show_bug.cgi?id=80556>.
* networkd: dhcp - use same metric for all DHCP-related routesTom Gundersen2014-06-30
|
* networkd: dhcp - update the lifetime of an existing addressTom Gundersen2014-06-29
| | | | | The logic otherwise is that we leave anything preconfigured alone, but in the case of DHCP we actually need to update it whenever the lease is renewed.
* networkd: improve DHCP error loggingTom Gundersen2014-06-29
|
* networkd: set static addresses immediatelyTom Gundersen2014-06-29
| | | | Don't wait for IPv4LL nor DHCP to finish before setting statically configured addresses.
* Add support for DHCP static route optionsEugene Yakubovich2014-06-29
| | | | | | This adds support for DHCP options 33 and 121: Static Route and Classless Static Route. To enable this feature, set UseRoutes=true in .network file. Returned routes are added to the routing table.
* networkd: merge DHCPv4 and DHCPv6 configTom Gundersen2014-06-29
| | | | | | | If there are v4 or v6 specific options we can keep those in separate sections, but for the common options, we will use only one. Moreovere only use DHCP=[yes/both|no/none|v4|v6] to enable or disable the clients.
* sd-dhcp-client/networkd: set lifetimes for IPv4 addressesPatrik Flykt2014-06-29
| | | | | | 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]
* networkd/sd-dhcp-server: only start dhcp server when necessaryTom Gundersen2014-06-29
|
* networkd: Properly stop router solicitation and DHCPv6 clientPatrik Flykt2014-06-26
| | | | | When a link fails or looses carrier, always stop ongoing router solicitation and any DHCPv6 client that may be running.
* networkd: link - fix memleak of icmp6 structTom Gundersen2014-06-20
|
* networkd: fix refcounting with UseMTU=yesSteven Noonan2014-06-19
| | | | | The link was unintentionally being unreferenced instead of referenced for the MTU setup.
* networkd: Add initial DHCPv6 supportPatrik Flykt2014-06-19
| | | | | Enable DHCPv6 support by creating a DHCPv6 boolean in the Network section. Add necessary DHCPv6 structures and initial function calls.
* networkd: configure dhcp server range only after successfully setting an IP ↵Lennart Poettering2014-06-18
| | | | | | address on the interface This way we can make use of the addresses of the IP pool.
* networkd: add address pool supportLennart Poettering2014-06-18
| | | | | | | | | | | | | | | | 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.
* networkd: link - fix carrier check on new linkTom Gundersen2014-06-17
| | | | | | We were comparing against our own internal enum rather than the kernel exposed one. Found by Thomas Ritter.
* networkd: introduce vxlanSusant Sahani2014-06-16
| | | | | | | | | | | | | | This patch enables netwokd to create vxlan Changes: Added: 1. File networkd networkd-vxlan.c 2. to netdev bool learning struct in_addr group uint64_t vxlanid; 3. VXLAN subsection and config parameters
* networkd: link - flush all pending NEWLINK events before trying to matchTom Gundersen2014-06-14
| | | | | | We could still have an old interface name and/or mac address when libudev tells us that the device is initialized, as the up-to-date info could still be on its way from the kernel.
* networkd: add assertTom Gundersen2014-06-14
| | | | | | | It should not be possible to have a DHCP lease on a link without also having an associated network. Add assert() to avoid compiler warnings. Reported by Thomas H. P. Andersen
* networkd: link - check returned value from set_lease_poolThomas Hindoe Paaboel Andersen2014-06-13
|
* networkd: link - left-align debug messagesTom Gundersen2014-06-13
| | | | | Still add some whitespace betwen ifname and the message to get the messages aligned (as I find it easier to spot specific messages this way).
* networkd: add dhcp server supportTom Gundersen2014-06-13
| | | | | | | | | | | | | | | | | | | | | | | | | When enabled in [Network] it will set up a dhcp server on the interface, listening on one of its statically configured IPv4 addresses and with a fixed size pool of leases determined from it. Example: [Match] Name=ve-arch-tree [Network] Address=192.168.12.5/24 DHCPServer=yes [Route] Gateway=192.168.12.5 Destination=192.168.12.0/24 In this case we will configure ve-arch-tree with the address 192.168.12.5 and hand out addresses in the range 192.168.12.6 - 192.168.12.38. In the future, we should (as suggested by Lennart) introduce a syntax to pick the server address automatically.
* networkd: link - intialize mac addressTom Gundersen2014-06-04
| | | | | | Otherwise .netwrok matching on MAC address will not work. Based on patch by Dave Reisner, and bug originally reported by Max Pray.
* networkd: split runtime config dir from state dirTom Gundersen2014-06-03
| | | | | | | | | | | | Configuration will be in root:root /run/systemd/network and state will be in systemd-network:systemd-network /run/systemd/netif This matches what we do for logind's seat/session state.
* networkd: link - serialize link when addresses changeTom Gundersen2014-05-21
| | | | Thanks to Kay for tracking this down.
* networkd/sd-network: extend operational statesTom Gundersen2014-05-19
| | | | Expose states 'degraded' or 'routable' if a link has a site/link-local or a routable address, respectively.
* networkd/sd-network: expose statically configured NTP serversTom Gundersen2014-05-19
|
* networkd: fixup static DNS serializationTom Gundersen2014-05-19
|
* resolved: add daemon to manage resolv.confTom Gundersen2014-05-19
| | | | Also remove the equivalent functionality from networkd.
* networkd: link - serialize DNS informationTom Gundersen2014-05-19
|
* networkd: log - only log about udev initalization on debug levelTom Gundersen2014-05-17
|
* networkd: keep list of active addressesTom Gundersen2014-05-17
|
* networkd: log the initialization status of linksTom Gundersen2014-05-16
|
* networkd: rename Address and Route list fieldsTom Gundersen2014-05-16
|
* networkd: logging - align messagesTom Gundersen2014-05-15
|
* networkd: log ifindices when links and netdevs are addedTom Gundersen2014-05-15
|
* networkd: rename NetDev variable for consistency with LinkTom Gundersen2014-05-15
|
* networkd, build-sys: spelling fixZbigniew Jędrzejewski-Szmek2014-05-15
|
* sd-bus: introduce sd_bus_slot objects encapsulating callbacks or vtables ↵Lennart Poettering2014-05-15
| | | | | | | | | | | attached to a bus connection This makes callback behaviour more like sd-event or sd-resolve, and creates proper object for unregistering callbacks. Taking the refernce to the slot is optional. If not taken life time of the slot will be bound to the underlying bus object (or in the case of an async call until the reply has been recieved).
* networkd: introduce ipip tunnelSusant Sahani2014-05-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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]
* networkd: get preexiting addresses when a link is addedTom Gundersen2014-05-11
|
* networkd: link - redo flag change loggingTom Gundersen2014-05-10
| | | | | | | | | Make the logging less verbose by only printing all the changed flags on one line, at the same time make it more complete by supporting all flags currently supported by the kernel. We still fall back to printing the raw flags in case we get something we do not recognize This may be useful when running on new kernels.
* networkd: link - don't log errors when missing routes/addresses are droppedTom Gundersen2014-05-09
| | | | We were ignoring the wrong errno.
* networkd: link - handle links coming back to lifeTom Gundersen2014-05-09
| | | | | When enslaving devices, we may receieve DELLINK/NEWLINK for the same ifindex, let's not be confused by this.
* networkd: reorder bonding and bridgingTom Gundersen2014-05-09
| | | | | A link should only ever be part of one, but if we accidentally do both, let's do it in the right order so the failure is more obvious in the logs.
* networkd: link - introduce LINGER state and link_drop()Tom Gundersen2014-05-09
| | | | We need the LINGER state in case we still have references to the link after it has been dropped.
* networkd: link - take refcounts on linksTom Gundersen2014-05-09
| | | | | | We need to take a refcount on the link whenever we expect a callback. The exceptions are the ipv4ll/dhcp clients as their lifetimes are guaranteed to be shorter than that of the link.
* networkd: introduce refcounting for Links and NetDevsTom Gundersen2014-05-09
|
* networkd: link - clean up state filesTom Gundersen2014-05-09
| | | | Also keep the path to the lease file around rather than regenarating it all the time.