summaryrefslogtreecommitdiff
path: root/src/network
AgeCommit message (Collapse)Author
2015-10-22networkd-manager: fix swapped argumentsreverendhomer
fixes Coverity #1328493
2015-10-21networkd: manager/link - only serialize once per event-loop iterationTom Gundersen
Every time the state is written out we may trigger third-party apps, so let's be a bit more careful about writing this out unnecessarily.
2015-10-21networkd: link - serialize addressesTom Gundersen
2015-10-21networkd: route - add hash_opsTom Gundersen
2015-10-21networkd: route - simplify route_new()Tom Gundersen
2015-10-21networkd: address - distinguish between addresses added by us and by othersTom Gundersen
We only keep the addresses that we added ourselves in link->addresses, and introduce a new set link->addresses_foreign to keep addresses of unknown origin. Only functional change is that "foreign" addresses no longer prevent a link from entering "configured" state.
2015-10-21networkd: address - rework firewall rules lifetimeTom Gundersen
Establish the firewall rule before creating the address, and do not create the address if the firewall rule could not be created. Also, only drop the firewall rule once the address has been removed from the kernel.
2015-10-21networkd: address - merge _change() into _configure()Tom Gundersen
These functions are almost entirely the same, so avoid duplication.
2015-10-21networkd: address - factor out address_update()Tom Gundersen
Call back into link_check_ready() whenever an address state change may have made a link ready.
2015-10-21networkd: link - only consider configured when all addresses are readyTom Gundersen
We were considering a link configured whilst its IPv6 addresses were still tentative. Fixes issue #650.
2015-10-16networkd: add support for configure IPv6 DADSusant Sahani
Configures Ipv6 Duplicate Address Detection. 10
2015-10-14Merge pull request #1530 from teg/network-fixes-2Lennart Poettering
networkd/libsystemd-network: collection of trivial patches v2
2015-10-12man: describe IPv6AcceptRouterAdvertisements= betterZbigniew Jędrzejewski-Szmek
With the previous description it wasn't clear that the kernel default is being described. Add link to kernel docs.
2015-10-11networkd: address - introduce address_is_ready()Tom Gundersen
Checks that a given address is not tentative nor deprecated.
2015-10-11networkd: make address_{establish,release}() staticTom Gundersen
No need to expose these functions, but rather call them from address_{add,drop}.
2015-10-11networkd: manager - avoid unnecessary memory allocationTom Gundersen
Don't allocate Address objects only to free them again when processing rtnl events.
2015-10-11networkd: address - store active addresses in a Set rather than a ListTom Gundersen
We need to be able to look these things up quickly as we will be updating them continuously and there can in principle be many of them.
2015-10-11networkd: address - process in manager.c rather than link.cTom Gundersen
2015-10-11networkd: link - refactor (un)refTom Gundersen
2015-10-11networkd: link - fix error handling in link_add()Tom Gundersen
2015-10-11networkd: link/network - correctly align log messagesTom Gundersen
2015-10-11networkd: address - add hash helpers for Address objectsTom Gundersen
Add compare_func and hash_func for the Address object. The notion of address equality is the same as in the kernel, and hashing preserves preserves equality. Two addresses are considered equal if: - they have the same address family, and - they are neither IPv4 nor IPv6 addresses, or - the local addresses are identical, and - they are IPv6 addresses, or - they have the same prefixlength, and - their peer prefixes are identical This fixes a bug in the old equality check, which got the local address and the peer prefix mixed up.
2015-10-11networkd: manager - free bus after own objectsTom Gundersen
Freeing links/addresses may trigger sending signals over the bus, so let's make sure the bus stays around until our own objects have been freed.
2015-10-11networkd: route/address - simplify and unify creatorsTom Gundersen
Rename new_dynamic() to simply _new() and reuse that from new_static().
2015-10-08networkd-link: remove unused variable assignment in link_save()reverendhomer
fixes Coverity #1317207
2015-10-05Merge pull request #1459 from ssahani/bridge1Tom Gundersen
networkd: add bridge properties
2015-10-05Merge pull request #1372 from jemk/prefsrcTom Gundersen
networkd: add support to configure preferred source of static routes
2015-10-05networkd: add bridge propertiesSusant Sahani
ForwardDelaySec: forward delay HelloTimeSec: hello time MaxAgeSec: maximum message age for more information see http://www.tldp.org/HOWTO/BRIDGE-STP-HOWTO/set-up-the-bridge.html In kernel br_dev_newlink: does not have the this functionality to set while creation. br_changelink: after creation we can change the parameters. we need to first create then set it the parameters. Introduce new callback post_create .This should set the properties after the creation.
2015-09-30tree-wide: remove a number of invocations of strerror() and replace by %mLennart Poettering
Let's clean up our tree a bit, and reduce invocations of the thread-unsafe strerror() by replacing it with printf()'s %m specifier.
2015-09-30tree-wide: clean up log_syntax() usageLennart Poettering
- Rely everywhere that we use abs() on the error code passed in anyway, thus don't need to explicitly negate what we pass in - Never attach synthetic error number information to log messages. Only log about errors we *receive* with the error number we got there, don't log any synthetic error, that don#t even propagate, but just eat up. - Be more careful with attaching exactly the error we get, instead of errno or unrelated errors randomly. - Fix one occasion where the error number and line number got swapped. - Make sure we never tape over OOM issues, or inability to resolve specifiers
2015-09-29util: introduce common version() implementation and use it everywhereLennart Poettering
This also allows us to drop build.h from a ton of files, hence do so. Since we touched the #includes of those files, let's order them properly according to CODING_STYLE.
2015-09-24networkd: Be opportunistic when declaring link configuredPatrik Flykt
The DHCP variable in the [Network] section of the network configuration file moves the link to the configured state according to the following: DHCP=yes Link is configured when either DHCPv4 or DHCPv6 succeed DHCP=ipv4 Link is configured only when DHCPv4 succeeds DHCP=ipv6 Link is configured only when DHCPv6 succeeds DHCP=no Neither DHCPv4 or DHCPv6 is attempted Reported by Martin Pitt. Fixes https://github.com/systemd/systemd/issues/1368
2015-09-24networkd: add support to configure preferred source of static routesJens Kuske
2015-09-24Merge pull request #1356 from pfl/dhcp6_suspendTom Gundersen
DHCPv6 suspend fixes
2015-09-23networkd: Wait for DHCPv6 before announcing link configuredPatrik Flykt
Wait until DHCPv6 has acquired an address before announcing the link to be configured. Log the DHCPv6 lease lost event.
2015-09-23sd-dhcp6-client: Properly handle DHCPv6 client restart after resumePatrik Flykt
Whenever a Router Advertisement is received, dhcp6_configure() will be called. A Router Advertisment can also instruct DHCPv6 to start acquiring IPv6 addresses in manged mode, if it previously was handling only other information. As an Router Advertisment is also received after the DHCPv6 client has resumed from a suspend, fix the function not to assume DHCPv6 is currently running, but instead try to restart it. Handle sd_dhcp6_start() returning -EALREADY indicating that the DHCPv6 client was already running. Collect all client unrefs in one place to unclutter the error handling. Fixes https://github.com/systemd/systemd/issues/963
2015-09-23Set accept_ra to "2" if enabled in configGeorg Müller
This causes the kernel to accept router advertisments even if ip forwarding is enabled for this interface. This fixes #1340.
2015-09-22Merge pull request #1335 from poettering/some-fixesDaniel Mack
A variety of mostly unrelated fixes
2015-09-22cgtop: underline table headerLennart Poettering
Let's underline the header line of the table shown by cgtop, how it is customary for tables. In order to do this, let's introduce new ANSI underline macros, and clean up the existing ones as side effect.
2015-09-22sd-lldp: hide internal detailsDavid Herrmann
Currently, sd-lldp.h exports "UPDATE_INFO".. and defines it to a magic constant '10'. This is completely bogus, so fix it to follow our coding standards: - Prefix exported symbols by SD_LLDP_* - Define a separate event-enum for event types - Translate internal state to external event-types
2015-09-22sd-ipv4ll: fix namespacingDavid Herrmann
Prefix all exported constants with SD_IPV4LL_* to avoid namespacing conflicts.
2015-09-22sd-icmp6-nd: fix namespacingDavid Herrmann
Prefix all exported constants by SD_ICMP6_ND_* to avoid any namespacing conflicts.
2015-09-22sd-dhcp6: fix namespacingDavid Herrmann
Prefix all exported constants with SD_DHCP6_CLIENT_* to avoid any namespacing conflicts.
2015-09-22sd-dhcp: fix namespacingDavid Herrmann
Prefix all constants with SD_DHCP_CLIENT_* to avoid namespacing conflicts.
2015-09-18sd-ipv4acd: introduce new library split out from sd-ipv4llTom Gundersen
This splits the Address Conflict Detection out of the Link Local library so that we can reuse it for DHCP and static addresses in the future. Implements RFC5227.
2015-09-18sd-ipv4ll: rework callbacksTom Gundersen
Firstly, no longer distinguish between STOP and INIT states. Secondly, do not trigger STOP events when calls to sd_ipv4ll_*() fail. The caller is the one who would receive the event and will already know that the call to sd_ipv4ll_*() has failed, so it is redundant. STOP events will now only be triggered by calling sd_ipv4ll_stop() explicitly or by some internal error in the library triggered by receiving a packet or an expiring timeout (i.e., any error that would otherwise not be reported back to the consumer of the library). Lastly, follow CODING_STYLE and always return NULL on unref. Protect from objects being destroyed in callbacks accordingly.
2015-09-12networkd:add support to configure ipv6 acceprt raSusant Sahani
This patch support to configure the ipv6 acceprt ra option. for more information see http://www.tldp.org/HOWTO/Linux+IPv6-HOWTO/proc-sys-net-ipv6..html
2015-09-09tree-wide: drop {} from one-line if blocksLennart Poettering
Patch via coccinelle.
2015-09-09tree-wide: use coccinelle to patch a lot of code to use mfree()Lennart Poettering
This replaces this: free(p); p = NULL; by this: p = mfree(p); Change generated using coccinelle. Semantic patch is added to the sources.
2015-09-07basic: rework virtualization detection APILennart Poettering
Introduce a proper enum, and don't pass around string ids anymore. This simplifies things quite a bit, and makes virtualization detection more similar to architecture detection.