summaryrefslogtreecommitdiff
path: root/src/network
AgeCommit message (Collapse)Author
2016-07-14network-ndisc: avoid VLAs (#3725)Daniel Mack
Do not allocate objects of dynamic and potentially large size on the stack to avoid both clang compilation errors and unpredictable runtime behavior on exotic platforms. Use the heap for that instead. While at it, refactor the code a bit. Access 's->domain' via NDISC_DNSSL_DOMAIN(), and refrain from allocating 'x' independently, but rather reuse 's' if we're dealing with a new entry to the set. Fixes #3717
2016-07-12Various fixes for typos found by lintian (#3705)Michael Biebl
2016-07-11treewide: fix typos and remove accidental repetition of wordsTorstein Husebø
2016-06-26networkd: use strv_fnmatch() (#3605)0xAX
2016-06-21tree-wide: some work-arounds for gcc false positives regarding uninitialized ↵Lennart Poettering
variables
2016-06-21networkd: fix bad memory access when parsing DNSSECNegativeTrustAnchors=Lennart Poettering
2016-06-16networkd: vrf: add support for enslaving devices to VRFsAndreas Rammhold
2016-06-16networkd: added support for vrf interfaces (#3316)Andreas Rammhold
2016-06-15tree-wide: htonl() is weird, let's use htobe32() instead (#3538)Lennart Poettering
Super-important change, yeah!
2016-06-14networkd: Tunnel add support to configure key for VTI/VTI6 (#3532)Susant Sahani
fixes #3298
2016-06-13networkd: fix NULL pointer (#3523)Susant Sahani
Not every link has kind associated with it. (gdb) r Starting program: /home/sus/tt/systemd/systemd-networkd Missing separate debuginfos, use: dnf debuginfo-install glibc-2.23.1-7.fc24.x86_64 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". vboxnet0: Gained IPv6LL wlp3s0: Gained IPv6LL enp0s25: Gained IPv6LL Enumeration completed Program received signal SIGSEGV, Segmentation fault. 0x00007ffff6e27ade in __strcmp_sse2_unaligned () from /lib64/libc.so.6 (gdb) bt src/network/networkd-link.c:2008 src/network/networkd-link.c:2059 src/network/networkd-link.c:2442 m=0x555555704a30, userdata=0x55555570bfe0) at src/network/networkd-link.c:2497 at src/libsystemd/sd-netlink/sd-netlink.c:347 src/libsystemd/sd-netlink/sd-netlink.c:402 src/libsystemd/sd-netlink/sd-netlink.c:432 userdata=0x5555556f7470) at src/libsystemd/sd-netlink/sd-netlink.c:739 src/libsystemd/sd-event/sd-event.c:2275 src/libsystemd/sd-event/sd-event.c:2626 timeout=18446744073709551615) at src/libsystemd/sd-event/sd-event.c:2685 bus=0x5555556f9af0, name=0x555555692315 "org.freedesktop.network1", timeout=30000000, check_idle=0x55555556ac84 <manager_check_idle>, userdata=0x5555556f6b20) at src/shared/bus-util.c:134 src/network/networkd-manager.c:1128 src/network/networkd.c:127 (gdb) f 1 src/network/networkd-link.c:2008 2008 if (link->network->bridge || streq("bridge", link->kind)) { (gdb) p link->kind $1 = 0x0
2016-06-13networkd: route priority replace parsing config_parse_uint32 with ↵Susant Sahani
safe_atou32 (#3522)
2016-06-12networkd: more vlan cleanup (#3506)Tobias Jungel
use config_parse_vlanid to parse vlan for BridgeFDB entries
2016-06-12networkd: cleanup of bridge vlan code (#3505)Tobias Jungel
cleanup minor nitpicks mentioned in #3428
2016-06-10networkd: fix bad memory access for routes that are note attached to a link ↵Lennart Poettering
yet (#3499) Corrects: 1b566071 Also see: https://github.com/systemd/systemd/pull/3478#issuecomment-225008542
2016-06-10Merge pull request #3428 from toanju/networkd/brvlanLennart Poettering
networkd: add support to configure VLAN on bridge ports
2016-06-10networkd: fix dbus matchmac interface (#3485)Andrew Jeddeloh
Fix issue where the *Network passed via userdata is being offset by offsetof(Network, matchmac) leading to incorrect values being exposed in dbus.
2016-06-10networkd: add support to configure VLAN on bridge portsTobias Jungel
2016-06-09networkd-link: parse linkinfo to get kindTobias Jungel
2016-06-09Merge pull request #3456 from poettering/ipv6-ra-renameTom Gundersen
networkd: rename IPv6AcceptRouterAdvertisements to IPv6AcceptRA
2016-06-09networkd: clean up vlan handling a bit (#3478)Lennart Poettering
Let's add a generic parser for VLAN ids, which should become handy as preparation for PR #3428. Let's also make sure we use uint16_t for the vlan ID type everywhere, and that validity checks are already applied at the time of parsing, and not only whne we about to prepare a netdev. Also, establish a common definition VLANID_INVALID we can use for non-initialized VLAN id fields.
2016-06-08Merge pull request #3431 from poettering/network-fixesTom Gundersen
put limits on addresses and routers per link and per network
2016-06-07networkd: rename IPv6AcceptRouterAdvertisements to IPv6AcceptRALennart Poettering
The long name is just too hard to type. We generally should avoid using acronyms too liberally, if they aren't established enough, but it appears that "RA" is known well enough. Internally we call the option "ipv6_accept_ra" anyway, and the kernel also exposes it under this name. Hence, let's rename the IPv6AcceptRouterAdvertisements= setting and the [IPv6AcceptRouterAdvertisements] section to IPv6AcceptRA= and [IPv6AcceptRA]. The old setting IPv6AcceptRouterAdvertisements= is kept for compatibility with older configuration. (However the section [IPv6AcceptRouterAdvertisements] is not, as it was never available in a published version of systemd.
2016-06-06network: beef up ipv6 RA support considerablyLennart Poettering
This reworks sd-ndisc and networkd substantially to support IPv6 RA much more comprehensively. Since the API is extended quite a bit networkd has been ported over too, and the patch is not as straight-forward as one could wish. The rework includes: - Support for DNSSL, RDNSS and RA routing options in sd-ndisc and networkd. Two new configuration options have been added to networkd to make this configurable. - sd-ndisc now exposes an sd_ndisc_router object that encapsulates a full RA message, and has direct, friendly acessor functions for the singleton RA properties, as well as an iterative interface to iterate through known and unsupported options. The router object may either be retrieved from the wire, or generated from raw data. In many ways the sd-ndisc API now matches the sd-lldp API, except that no implicit database of seen data is kept. (Note that sd-ndisc actually had a half-written, but unused implementaiton of such a store, which is removed now.) - sd-ndisc will now collect the reception timestamps of RA, which is useful to make sd_ndisc_router fully descriptive of what it covers. Fixes: #1079
2016-06-06lldp: add proper ref counting to sd_lldp object and a separate call for ↵Lennart Poettering
setting the ifindex Let's make sd-lldp a bit more like sd-ndisc ant the other APIs, and add proper ref counting and a separate call for setting the ifindex. This also adds a new lldp_reset() call we can use at various places to close all fds. This is also similar to how sd-ndisc already does it.
2016-06-06networkd: remove unused variable (#3447)Tobias Jungel
this patch solves the following waring: ../src/network/networkd-ndisc.c:197:13: warning: unused variable ‘r’ [-Wunused-variable] int r; fixes acac5b2f
2016-06-04networkd-link: fix handler typo for route_remove() (#3433)tomty89
Obviously we've been using the wrong handler here. Fixes #3352.
2016-06-03networkd: constify more thingsLennart Poettering
2016-06-03networkd: also enforce limit on total number of address/routesLennart Poettering
This covers the address/routers acquire dynamically.
2016-06-03networkd: drop weird "const" usage in function parametersLennart Poettering
We generally only use "const" to constify the destination of pointers, but not the pointers themselves, as they are copied anyway during C function invocation. Hence, drop this usage of "const".
2016-06-03networkd: enforce a limit on the number of statically assigned ↵Lennart Poettering
addresses/routes/fdb entries We should put a limit on everything, hence also on these resources.
2016-06-02networkd-ndisc: do not start DHCPv6 when after NDISC timeoutTom Yan
For it's silly and unnecessary. Although it was apparently mandated by RFC 2462 in [5.5.2. Absence of Router Advertisements], that has been changed in the same section of RFC 4862, which obsoleted the former RFC.
2016-06-01networkd-dhcp6: generalize DHCPv6 client (re)startingTom Yan
dhcp6_request_address() was merely a function to switch the DHCPv6 client from "stateless" mode to "stateful" mode. It was also a one-way switch. Also, to (re)start the client, we would need to repeat separate function calls. In this patch, dhcp6_request_address() is made a general starter/manager of the DHCPv6 client. It now takes an extra parameter so we will be specifying which mode the DHCPv6 client should be started in. Also it will keep track of the current mode and compare with the newly requested mode, and only restart the client in case there is a difference between them. This also makes sure that the DHCPv6 client will be (re)started accordingly as per the Router Advertisement flags.
2016-05-30networkd: bridge add support to configure VLAN filtering (#3344)Tobias Jungel
This patch implements support for IFLA_BR_VLAN_FILTERING configuration.
2016-05-29Merge pull request #3378 from keszybz/unit-write-drop-in-newline-removalLennart Poettering
Remove newlines from drop in format strings + some formatting fixes
2016-05-28Merge pull request #3326 from tomty89/update-2Zbigniew Jędrzejewski-Szmek
networkd: IPv6 fixes
2016-05-28Typo fix: s/advertisment/advertisement/Zbigniew Jędrzejewski-Szmek
2016-05-28networkd: disable IPv6 for bridge slaveTom Yan
If an interface is managed as a bridge slave, we don't want any IP configuration for it. Therefore, disable IPv6 in such case.
2016-05-28networkd: unset master if not enslaved with networkdTom Yan
When we manage an interface with networkd but not as a slave (i.e. no `Bridge=` or `Bond=` set in its .network), we do not want it to remain slaved.
2016-05-26ipv4ll: change "seed" parameter to be uint64_tLennart Poettering
Let's make clear this always has the same size, since otherwise it's not useful for reproducible runs, which this is really about however.
2016-05-26sd-network: rename "index" field of the various clients to "ifindex"Lennart Poettering
A field "index" is not particularly precise and also might conflict with libc's index() function definition. Also, pretty much everywhere else we call this concept "ifindex", including in networkd, the primary user of these libraries. Hence, let's fix this up and call this "ifindex" everywhere here too.
2016-05-25networkd: Disable IPv6 when DHCPv6 is only enabledTom Yan
DHCPv6 requires an IPv6 link-local address to work. The client will not be started (even when enabled explicitly with `DHCP=`) if none is configured (either by autoconfiguration or manually). Therefore, disable IPv6 in such case.
2016-05-25networkd: set IFLA_INET6_ADDR_GEN_MODE as per stable_secretTom Yan
Although networkd has option (LinkLocalAddressing=) to toggle IPv6LL autoconfiguration, when it is enabled, the address is autoconfigured by the kernel, but not networkd. Therefore, we do not statically set IFLA_INET6_ADDR_GEN_MODE to IN6_ADDR_GEN_MODE_EUI64, but dynamically depending on whether stable_secret is set, just as what the kernel does by default. Note that this does NOT affect the global addresses configured by networkd.
2016-05-21networkd-ndisc: do not return value from void functionsystemd/v230Zbigniew Jędrzejewski-Szmek
Fixup for #3304. Only warn, and not return, because that's what sd_dhcp6_client_start() does right below the call to sd_dhcp6_client_set_local_address().
2016-05-20Merge pull request #3304 from tomty89/masterTom Gundersen
[networkd] ndisc DHCPv6 triggering fixes
2016-05-20Merge pull request #3276 from ssahani/issue-3264Tom Gundersen
networkd: Drop IPv6LL address when link is down.
2016-05-20Merge pull request #3235 from dkg/hwaddr-cleanupTom Gundersen
minor improvements for dealing with MAC Addresses
2016-05-20[networkd-dhcp6] do not call sd_dhcp6_client_start() from ↵tomty89
dhcp6_request_address() Starting the DHCP client doesn't seem like dhcp6_request_address()'s responsibility anyway. Whenever it's called, sd_dhcp6_client_start() is unconditionally called outside of it as well. See ndisc_router_handler() and ndisc_handler() in networkd-ndisc.c.
2016-05-20[networkd-ndisc] set IPv6LL address in DHCP clienttomty89
Fix issue #3256 and probably #1982. Referenced link_acquire_ipv6_conf() in networkd-link.c.
2016-05-18networkd: Drop IPv6LL address when link is downSusant Sahani
Now we are not dropping the IPv6LL address when link is down. So next time when link is up and before kernel acquired this address we are using the old address. When the link is down kernel tells us that this address is no longer valid . Let's remove this address and again when kernel tells us that the address is added let's use it. fixes #3264