summaryrefslogtreecommitdiff
path: root/src/network
AgeCommit message (Collapse)Author
2015-08-06tree-wide: fix indentationThomas Hindoe Paaboel Andersen
2015-08-03tree-wide: convert bootchart and lldp code to use clock_boottime_or_monotonic()Lennart Poettering
We should avoid using CLOCK_BOOTTIME directly unless we actually can sensible distuingish it from CLOCK_MONOTONIC. CLOCK_BOOTTIME is only fully feature on very recent Linux kernels, hence we should stick to a fallback logic, which is already available in the clock_boottime_or_monotonic() call.
2015-08-03Merge pull request #837 from ssahani/dhcpDaniel Mack
networkd: fix neworkd crash
2015-08-02networkd: fix neworkd crashSusant Sahani
fix issue #827 hostname should be init to NULL.
2015-07-30tree-wide: use free_and_strdup()Daniel Mack
Use free_and_strdup() where appropriate and replace equivalent, open-coded versions.
2015-07-29Merge pull request #779 from poettering/fflush-and-checkDaniel Mack
tree-wide: port everything over to fflush_and_check()
2015-07-29Merge pull request #764 from ssahani/vxlan1Tom Gundersen
networkd: Add VXLAN Netlink attributes
2015-07-29Merge branch 'master' of github.com:systemd/systemdDaniel Mack
2015-07-29tree-wide: port everything over to fflush_and_check()Lennart Poettering
Some places invoked fflush() directly with their own manual error checking, let's unify all that by using fflush_and_check(). This also unifies the general error paths of fflush()+rename() file writers.
2015-07-29networkd-wait-online: only consider interfaces given on the commandlineTom Gundersen
If some interfaces are given on the commandline, ignore all others.
2015-07-29networkd: fix size of networkd binarySusant Sahani
This patch fixes the size of networkd Bug #775 before: size systemd-networkd text data bss dec hex filename 1493755 8424392 2337 9920484 975fe4 systemd-networkd After $ size systemd-networkd text data bss dec hex filename 1493555 35752 2337 1531644 175efc systemd-networkd
2015-07-29networkd: vxlan add support for GBPSusant Sahani
This patch add support for vxlan VXLAN Group Policy Option. https://tools.ietf.org/html/draft-smith-vxlan-group-policy-00 http://lwn.net/Articles/628683/
2015-07-29networkd-wait-online: fix raceTom Gundersen
We must consider 'pending' links as if they may be managed by networkd, as this is the state we enter before deciding wether networkd should manage the link or not, so we better wait for this decision being made.
2015-07-28Merge pull request #732 from ssahani/macvtapTom Gundersen
networkd: add support for Macvtap
2015-07-27networkd: capitalize VNetHeader= as VnetHeader=Lennart Poettering
Even when we use shortened, combined words, we still should uppercase where a new word starts. I couldn't find a canonically capitalized version of this term, hence I think we should follow our naming rules here.
2015-07-27networkd: add support for macvtapSusant Sahani
This patch add support for macvtap. see http://virt.kernelnewbies.org/MacVTap
2015-07-26networkd-wait-online: fix -i argumentMartin Pitt
-i (aka --interface) takes an argument. Tell getopt_long() that, so that optarg isn't NULL.
2015-07-24networkd: rename RootBlock to AllowPortToBeRootZbigniew Jędrzejewski-Szmek
Justification is similar to BPDUGuard rename. "Positive" values are easier. This is a rather uncommon option, so using a slightly longer name should not be a problem, and may in fact may make it easier to guess what the option does without reading the documentation.
2015-07-24networkd: turn UnicastFlood on by defaultZbigniew Jędrzejewski-Szmek
Looking at the kernel commit, "on" seems to be the default value: commit 867a59436fc35593ae0e0efcd56cc6d2f8506586 Author: Vlad Yasevich <vyasevic@redhat.com> Date: Wed Jun 5 10:08:01 2013 -0400 bridge: Add a flag to control unicast packet flood. Add a flag to control flood of unicast traffic. By default, flood is on and the bridge will flood unicast traffic if it doesn't know the destination. When the flag is turned off, unicast traffic without an FDB will not be forwarded to the specified port. ... and it seems to be the reasonable thing to do by default.
2015-07-24networkd: rename BPDUGuard to UseBPDUZbigniew Jędrzejewski-Szmek
Rename to follow the follow the style of other options. In general "positive" options are preferred to "negative" ones, because they are easier to describe and easier for humans to parse (c.f. the shortening on the man page entry).
2015-07-24network: rename DiffServiceCodePoint to CopyDSCPZbigniew Jędrzejewski-Szmek
Old name was slightly misleading, because this flag does not determine whether DSCP is used overall, but only if it is copied to the decapsulated packet. Rename to better reflect that. "Copy" does not imply direction. This is on purpose, because we might later on enhance the setting to allow/disallow copying in the other direction, to the encapsulated packet. If that is implemented, CopyDSCP could understand additional values. This is nicer than having two separate settings and follows the example of DHCP=. Also, we try to avoid abbreviations, but we allow acronyms like MTU, in DiscoverPathMTU=. This setting was recently added, so it's fine to rename it without backwards compat.
2015-07-23Merge pull request #683 from ssahani/tun1Tom Gundersen
networkd: ip6gre add support for flowlabel
2015-07-23networkd: add bridge link propertiesSusant Sahani
new bridge properties br.network [Match] Name=enp0s25 [Network] Bridge=br-test [Bridge] Cost=332 BPDUGuard = true HairPin = true FastLeave = true RootBlock = true UnicastFlood = true
2015-07-23networkd: ip6gre add support for flowlabelSusant Sahani
2015-07-23networkd: ip6 tunnel add DSCPSusant Sahani
This patch adds support for setting the DSCP field in the ip6 tunnel. when set it inherits DSCP field between inner and outer header.
2015-07-21networkd: ip6 tunnel add support for flowlabelSusant Sahani
Add Pv6 Flow Label support. The 20-bit Flow Label field in the IPv6 header[RFC2460] is used by a node to label packets of a flow.
2015-07-20Merge pull request #549 from ssahani/dhcpTom Gundersen
networkd: allow hostname override
2015-07-17Merge pull request #607 from ssahani/vxlan1David Herrmann
networkd: move config parsers to specific header files
2015-07-16networkd: move config_parse_tunnel_addressSusant Sahani
move config_parse_tunnel_address from networkd.h to tunnel specific file networkd-netdev-tunnel.h
2015-07-16networkd: move config_parse_vxlan_group_addressSusant Sahani
move config_parse_vxlan_group_address from networkd.h to networkd-netdev-vxlan.h
2015-07-14networkd: tap add support for vnet_hdrSusant Sahani
This patch adds support to configure IFF_VNET_HDR flag for a tap device. It allows whether sending and receiving large pass larger (GSO) packets. This greatly increases the achievable throughput.
2015-07-10networkd: DHCP override hostnameSusant Sahani
This patch enhances the DHCP client to send the hostname reference http://lists.freedesktop.org/archives/systemd-devel/2014-July/021550.html Tested with Example conf: [Match] Name=eth1 [Network] DHCP=v4 [DHCP] SendHostname=true Hostname=test
2015-07-08Merge pull request #516 from utezduyar/consistent-get-callback-returnLennart Poettering
property callback returns are consistent
2015-07-08property callback returns are consistentUmut Tezduyar Lindskog
It is no different to return 0 over 1 in the property callback. It is confusing to return 1 which made me think 1 has a special purpose. This way code is consistent with the rest of the tree.
2015-07-06fileio: consolidate write_string_file*()Daniel Mack
Merge write_string_file(), write_string_file_no_create() and write_string_file_atomic() into write_string_file() and provide a flags mask that allows combinations of atomic writing, newline appending and automatic file creation. Change all users accordingly.
2015-07-06networkd: various fixes for the IPv6 privacy extensions supportLennart Poettering
- Make sure that the IPv6PrivacyExtensions=yes results in prefer-temporary, not prefer-public. - Introduce special enum value "kernel" to leave setting unset, similar how we have it for the IP forwarding settings. - Bring the enum values in sync with the the strings we parse for them, to the level this makes sense (specifically, rename "disabled" to "no", and "prefer-temporary" to "yes"). - Make sure we really set the value to to "no" by default, the way it is already documented in the man page. - Fix whitespace error. - Make sure link_ipv6_privacy_extensions() actually returns the correct enum type, rather than implicitly casting it to "bool". - properly size formatting buffer for ipv6 sysctl value - Don't complain if /proc/sys isn't writable - Document that the enum follows the kernel's own values (0 = off, 1 = prefer-public, 2 = prefer-temporary) - Drop redundant negating of error code passed to log_syntax() - Manpage fixes This fixes a number of issues from PR #417
2015-07-06Merge pull request #495 from poettering/forwarding-fixDaniel Mack
networkd: be more defensive when writing to ipv4/ipv6 forwarding sett…
2015-07-06networkd: be more defensive when writing to ipv4/ipv6 forwarding settingsLennart Poettering
1) never bother with setting the flag for loopback devices 2) if we fail to write the flag due to EROFS (which is likely to happen in containers where /proc/sys is read-only) or any other error, check if the flag already has the right value. If so, don't complain. Closes #469
2015-07-06treewide: fix typosTorstein Husebø
2015-07-05Merge pull request #417 from ssahani/ipv6-privateDaniel Mack
Ipv6 private extensions
2015-07-05networkd: Add support for ipv6 privacy extensionSusant Sahani
This patch add support for ipv6 privacy extensions. The variable /proc/sys/net/ipv6/conf/<if>/use_tempaddr can be changed via the boolean IPv6PrivacyExtensions=[yes/no/prefer-temporary] When true enables privacy extensions, but prefer public addresses over temporary addresses. prefer-temporary prefers temporary adresses over public addresses. Defaults to false. [Match] Name=enp0s25 [Network] IPv6PrivacyExtensions=prefer-temporary
2015-07-03Fix error message for enumerate addressesrinrinne
Error message for enumerating addresses was not 'addresses' but 'links'. This patch fixes it.
2015-06-29networkd: netdev - avoid hanging transactions in failure casesTom Gundersen
If a link is attempted t obe enslaved by a netdev that has already failed, we must fail immediately and not save the callback for later, as it will then never get triggered.
2015-06-29networkd: fix segfault when cancelling callbacksTom Gundersen
This only happens when something has gone wrong, so is not easy to hit. However, if a bridge (say) is configured on a system without bridge support we will hit this. Fixes issue #299.
2015-06-24sd-netlink: don't export internal type-system detailsDavid Herrmann
The kernel bonding layer allows passing an array of ARP IP targets as bond-configuration. Due to the weird implementation of arrays in netlink (which we haven't figure out a generic way to support, yet), we usually hard-code the supported array-sizes. However, this should not be exported from sd-netlink. Instead, make sure the caller just uses it's current hack of enumerating the types, and the sd-netlink core will have it's own list of supported array-sizes (to be removed in future extensions, btw!). If either does not match, we will just return a normal error. Note that we provide 2 constants for ARP_IP_TARGETS_MAX now. However, both have very different reasons: - the constant in netdev-bond.c is used to warn the user that the given number of targets might not be supported by the kernel (even though the kernel might increase that number at _any_ time) - the constant in sd-netlink is solely used due to us missing a proper array implementation. Once that's supported in the type-system, it can be removed without notice Last but not least, this patch turns the log_error() into a log_warning(). Given that the previous condition was off-by-one, anyway, it never hit at the right time. Thus, it was probably of no real use.
2015-06-19networkd: vlan improve loggingSusant Sahani
Replaces strerror() usage with log_netdev_error_errno()
2015-06-15everywhere: port everything to sigprocmask_many() and friendsLennart Poettering
This ports a lot of manual code over to sigprocmask_many() and friends. Also, we now consistly check for sigprocmask() failures with assert_se(), since the call cannot realistically fail unless there's a programming error. Also encloses a few sd_event_add_signal() calls with (void) when we ignore the return values for it knowingly.
2015-06-15firewall: rename fw-util.[ch] → firewall-util.[ch]Daniel Mack
The names fw-util.[ch] are too ambiguous, better rename the files to firewall-util.[ch]. Also rename the test accordingly.
2015-06-14Merge pull request #183 from ssahani/netDavid Herrmann
Improve tun/tap logging by using the new log_*errno*() functions that set 'errno' explicitly. Also fix a bunch of incorrect errno/r confusions.
2015-06-14networkd: tuntap improve loggingSusant Sahani
Replaces strerror() usage with log_netdev_error_errno()