summaryrefslogtreecommitdiff
path: root/src/network
AgeCommit message (Collapse)Author
2016-05-10Merge pull request #3220 from keszybz/install-fixesLennart Poettering
Fix "preset-all" with dangling symlinks and install-section hint emitted too eagerly
2016-05-09tree-wide: rename draw_special_char to special_glyphZbigniew Jędrzejewski-Szmek
That function doesn't draw anything on it's own, just returns a string, which sometimes is more than one character. Also remove "DRAW_" prefix from character names, TREE_* and ARROW and BLACK_CIRCLE are unambigous on their own, don't draw anything, and are always used as an argument to special_glyph(). Rename "DASH" to "MDASH", as there's more than one type of dash.
2016-05-09networkd: reworkd LLDP emission to allow control of propagation levelLennart Poettering
This allows selecting the propagation level of emitted LLDP packets (specifically: the destination MAC address of the packets). This is useful because it allows generating LLDP packets that optionally cross certain types of bridges. See 802.11ab-2009, Table 7-1 for details.
2016-05-09tree-wide: port more code to use ifname_valid()Lennart Poettering
2016-05-06networkd: move the IAID configuration option into the [DHCP] sectionLennart Poettering
It's only relevant to DHCP, and it should be where the DUID is configured too.
2016-05-06Merge pull request #3201 from ssahani/net-wordLennart Poettering
networkd lib: cleanup FOREACH_WORD
2016-05-06networkd: route fix commentSusant Sahani
2016-05-05test-networkd-conf: fix memleakThomas Hindoe Paaboel Andersen
2016-05-05networkd: fix memleak in config_parse_duid_rawdataThomas Hindoe Paaboel Andersen
2016-05-05Trivial network cleanup (#3196)Thomas H. P. Andersen
* gitignore: typo fix for test-networkd-conf * networkd: fix double include
2016-05-04Merge pull request #3156 from keszybz/duid-settingsLennart Poettering
Rework DUID setting
2016-05-03networkd: Add support to configure IPv6 preferred lifetime (#3102)Susant Sahani
Closes #2166. We only allow 0, infinity and forever. infinity and forever is same.
2016-05-03networkd: add support to set route tableSusant Sahani
networkd: add support to set route table 1. add support to configure the table id. if id is less than 256 we can fit this in the header of route as netlink property is a char. But in kernel this proepty is a unsigned 32. Hence if greater that 256 add this as RTA_TABLE attribute. 2. we are not setting the address family now. Now set this property.
2016-05-03network: get rid of DUID_TYPE_RAWZbigniew Jędrzejewski-Szmek
It wasn't used for anything after the recent changes.
2016-05-03test-networkd-conf: add tests for the parsing functionsZbigniew Jędrzejewski-Szmek
2016-05-03networkd: rework duid_{type,duid_type,duid,duid_len} settingZbigniew Jędrzejewski-Szmek
Separate fields are replaced with a struct. Second second duid type field is removed. The first field was used to carry the result of DUIDType= configuration, and the second was either a copy of this, or contained the type extracted from DuidRawData. The semantics are changed so that the type specified in DUIDType is always used. DUIDRawData= no longer overrides the type setting. The networkd code is now more constrained than the sd-dhcp code: DUIDRawData cannot have 0 length, length 0 is treated the same as unsetting. Likewise, it is not possible to set a DUIDType=0. If it ever becomes necessary to set type=0 or a zero-length duid, the code can be changed to support that. Nevertheless, I think that's unlikely. This addresses #3127 § 1 and 3. v2: - rename DUID.duid, DUID.duid_len to DUID.raw_data, DUID.raw_data_len
2016-05-03dh-dhcp{,6}-client: change the semantics of DUID settingZbigniew Jędrzejewski-Szmek
Both versions of the code are changed to allow the caller to override DUID using simple rules: duid type and value may be specified, in which case the caller is responsible to providing the contents, or just duid type may be specified as DUID_TYPE_EN, in which case we we fill in the values. In the future more support for other types may be added, e.g. DUID_TYPE_LLT. There still remains and ugly discrepancy between dhcp4 and dhcp6 code: dhcp6 has sd_dhcp6_client_set_duid and sd_dhcp6_client_set_iaid and requires client->state to be DHCP6_STATE_STOPPED, while dhcp4 has sd_dhcp_client_set_iaid_duid and will reconfigure the client if it is not stopped. This commit doesn't touch that part. This addresses #3127 § 2.
2016-04-29networkd: rework headers to avoid circular includesZbigniew Jędrzejewski-Szmek
Header files were organized in a way where the includer would add various typedefs used by the includee before including it, resulting in a tangled web of dependencies between files. Replace this with the following logic: networkd.h / \ networkd-link.h \ networkd-ipv4ll.h--\__\ networkd-fdb.h \ networkd-network.h netword-netdev-*.h networkd-route.h \ networkd-netdev.h If a pointer to a structure defined in a different header file is needed, use a typedef line instead of including the whole header.
2016-04-29networkd: clean up DUID code a bitLennart Poettering
Let's move DUID configuration into the [DHCP] section, since it only makes sense in a DHCP context, and should be close to the configuration of ClientIdentifier= and suchlike. This really shouldn't be a section of its own, we don't have any for any of our other per-protocol specific identifiers... Follow-up for #2890 #2943
2016-04-29Merge pull request #3137 from keszybz/dirent-simplificationLennart Poettering
Various small cleanups in shared code
2016-04-28networkd: reconfigure IPv6 and static address after link up event (#3105)Susant Sahani
Now we are not setting static address, start dhcp6 client and discovering IPv6 routers after link gained carrier. This fixes #2912.
2016-04-27networkd: drop unnecessary stmtZbigniew Jędrzejewski-Szmek
2016-04-25networkd: Address- initialize the node before adding to list.Susant Sahani
It make more sense to initalize the node first then we add to the list.
2016-04-25networkd: Fix route properties.Susant Sahani
We are not able to add multiple properties. wlp3s0.network: [Match] Name=wlp3s0 [Route] Gateway=10.68.5.26 Metric=10 sudo ./systemd-networkd Failed to parse file '/usr/lib/systemd/network/wlp3s0.network': File exists Could not load configuration files: File exists This patch fixes it.
2016-04-22networkd: consider various IPv6 features as disabled if IPv6 is not ↵Lennart Poettering
available in the kernel
2016-04-21tree-wide: use mdash instead of a two minusesZbigniew Jędrzejewski-Szmek
2016-04-21networkd: When link gets dirty mark manager dirty too (#3080)Susant Sahani
If we not marking manager dirty when link is dirty then the state file is not updated. This is a side effect of issue 2850 setting CriticalConnection=yes timesyncd NTP servers given by DHCP server are ignored.
2016-04-20networkd: respect DHCP UseRoutes option (#3075)Susant Sahani
This fixes #2282.
2016-04-20networkd: bump MTU to 1280 for interfaces which have IPv6 enabled (#3077)Susant Sahani
IPv6 protocol requires a minimum MTU of 1280 bytes on the interface. This fixes #3046. Introduce helper link_ipv6_enabled() to figure out whether IPV6 is enabled. Introduce network_has_static_ipv6_addresses() to find out if any static ipv6 address configured. If IPv6 is not configured on any interface that is SLAAC, DHCPv6 and static IPv6 addresses not configured, then IPv6 will be automatically disabled for that interface, that is we write "1" to /proc/sys/net/ipv6/conf//disable_ipv6.
2016-04-18networkd: allow setting of multicast querier for linux bridge (#3051)Susant Sahani
2016-04-14networkd: Add support to configure proxy arp support to interfaces (#3020)Susant Sahani
Fixes: #2889
2016-04-12sd-lldp: drop LLDP ethernet export from sd-lldp.hLennart Poettering
We only use it for the Tx code anyway, hence sd-lldp.h shouldn't expose it, as it only implements Rx.
2016-04-12network: hashmap_put() can failLennart Poettering
Let's properly handle hashmap_put() failing.
2016-04-08network: check return valueZbigniew Jędrzejewski-Szmek
CID #1349698.
2016-04-08Merge pull request #2985 from keszybz/lldp-assertMartin Pitt
Replace if with assert_cc in lldp code and a build-sys tweak
2016-04-07Merge pull request #2943 from vinaykul/systemd_duid_review_fixesZbigniew Jędrzejewski-Szmek
DHCP DUID parsing fix, logging fix, man-page fix
2016-04-07lldp: replace if with assert_ccZbigniew Jędrzejewski-Szmek
LLDP_TX_HOLD or one of the other variables might be changed in the future resulting in a silent error here if the if was just removed. Replacement for #2983.
2016-04-04Address code-review items for pull-request #2890Vinay Kulkarni
1. Replace strtol with unhexchar, verified with valid and invalid DUID strings. 2. Fix logging to use log_syntax instead of log_error. 3. On error reading DUID, ignore read and preserve previous state. 4. Fix man-pages to use markup, remove options not yet implemented. 5. Remove spurious header line in new files.
2016-04-02Add networkd-gperf.c to gitignoreZbigniew Jędrzejewski-Szmek
For #2915.
2016-03-31Merge pull request #2915 from vinaykul/masterZbigniew Jędrzejewski-Szmek
2016-03-30DHCP DUID, IAID configuration optionsVinay Kulkarni
2016-03-24lldp: move public macros to sd-lldp.h and namespace themBeniamino Galvani
lldp.h contains definitions of LLDP types, subtypes and capabilities which should be exposed in public headers. Get rid of the file and move those definitions to sd-lldp.h with the SD_ prefix.
2016-03-21Revert "DHCP DUID and IAID configurability"Zbigniew Jędrzejewski-Szmek
2016-03-09DHCP DUID and IAID configurabilityVinay Kulkarni
2016-03-09Merge pull request #2755 from keszybz/more-testsMartin Pitt
Enable more tests by default, and even more with `--enable-tests=unsafe`
2016-03-05tree-wide: use SET_FLAG() macro to make code more clearAlexander Kuleshov
2016-03-04networkctl: avoid reading past end of input bufferZbigniew Jędrzejewski-Szmek
name is IFNAMSIZ bytes, but we would copy sizeof(info->name) bytes, which is IFNAMSIZ + 1. In effect we would go outside of the source buffer and possibly leave a non-null terminated string in info->name. CID #1351754.
2016-03-04networkctl: use ETHER_ADDR_NULL in one more placeZbigniew Jędrzejewski-Szmek
2016-02-25Merge pull request #2671 from 0xAX/move-pager-open-to-one-placeZbigniew Jędrzejewski-Szmek
tree-wide: merge pager_open_if_enabled() to the pager_open()
2016-02-26tree-wide: merge pager_open_if_enabled() to the pager_open()Alexander Kuleshov
Many subsystems define own pager_open_if_enabled() function which checks '--no-pager' command line argument and open pager depends on its value. All implementations of pager_open_if_enabled() are the same. Let's merger this function with pager_open() from the shared/pager.c and remove pager_open_if_enabled() from all subsytems to prevent code duplication.