Systemd/src/network
Lennart Poettering f3c33b234d networkd: fix memory corruption
When loading .netdev files we parse them twice: first we do one parsing
iteration to figure out their "kind", and then we do it again to parse
out the kind's parameters. The first iteration is run with a "short"
NetDev structure, that only covers the generic NetDev properties. Which
should be enough, as we don't parse the per-kind properties. However,
before this patch we'd still try to destruct the per-kind properties
which resulted in memory corruption. With this change we distuingish the
two iterations by the state field, so that the destruction only happens
when the state signals we are running with a full NetDev structure.

Since this is not obvious, let's add a lot of comments.
2018-01-05 13:59:12 +01:00
..
netdev networkd: fix memory corruption 2018-01-05 13:59:12 +01:00
wait-online Add a "RequiredForOnline=" Link attribute for .network files (#7347) 2017-11-30 18:03:50 +01:00
meson.build meson: rename libudev_internal to libudev_static and link into libudev 2018-01-03 12:09:46 +01:00
networkctl.c tree-wide: make use of new STRLEN() macro everywhere (#7639) 2017-12-14 19:02:29 +01:00
networkd-address-label.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-address-label.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-address-pool.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-address-pool.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-address.c networkd: Free Prefix in case allocation fails (#7480) 2017-11-27 13:07:22 +01:00
networkd-address.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-brvlan.c *: fix some inconsistent control statement style 2017-12-01 16:49:52 -08:00
networkd-brvlan.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-conf.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-conf.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-dhcp4.c networkd/dhcp: shorten overlong hostname (#7616) 2017-12-13 18:00:46 +01:00
networkd-dhcp6.c tree-wide: adjust fall through comments so that gcc is happy 2017-11-20 13:06:25 -08:00
networkd-fdb.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-fdb.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-gperf.gperf tree-wide: adjust fall through comments so that gcc is happy 2017-11-20 13:06:25 -08:00
networkd-ipv4ll.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-ipv6-proxy-ndp.c networkd: don't try to configure IPv6 proxy NDP if IPv6 is not available (#7613) 2017-12-13 13:47:10 +09:00
networkd-ipv6-proxy-ndp.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-link-bus.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-link.c tree-wide: use __fsetlocking() instead of fxyz_unlocked() 2017-12-14 10:42:25 +01:00
networkd-link.h networkd: Fix race condition in [RoutingPolicyRule] handling (#7615) 2017-12-12 16:25:36 +01:00
networkd-lldp-tx.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-lldp-tx.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-manager-bus.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-manager.c networkd,resolved: make use of watch_bind feature to connect to the bus 2018-01-05 13:58:32 +01:00
networkd-manager.h networkd,resolved: make use of watch_bind feature to connect to the bus 2018-01-05 13:58:32 +01:00
networkd-ndisc.c Merge pull request #6910 from ssahani/issue-6359 2017-11-20 19:21:36 +01:00
networkd-ndisc.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-network-bus.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-network-gperf.gperf networkd: allow to configure default/initial send/recv congestion window and store persistentl (#7750) 2017-12-29 23:18:05 +09:00
networkd-network.c core,udev,networkd: add ConditionKernelVersion= 2017-12-26 17:39:44 +01:00
networkd-network.h core,udev,networkd: add ConditionKernelVersion= 2017-12-26 17:39:44 +01:00
networkd-radv.c networkd: Ignore DNS information when uplink is not managed (#7571) 2017-12-08 13:33:40 +01:00
networkd-radv.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-route.c networkd: allow to configure default/initial send/recv congestion window and store persistentl (#7750) 2017-12-29 23:18:05 +09:00
networkd-route.h networkd: allow to configure default/initial send/recv congestion window and store persistentl (#7750) 2017-12-29 23:18:05 +09:00
networkd-routing-policy-rule.c Fix #7704 and #7708. (#7712) 2017-12-21 21:27:45 +09:00
networkd-routing-policy-rule.h Fix #7704 and #7708. (#7712) 2017-12-21 21:27:45 +09:00
networkd-util.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-util.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
org.freedesktop.network1.conf networkd: add basic dbus API 2015-02-05 11:50:34 +01:00
org.freedesktop.network1.service Add SPDX license headers to various assorted files 2017-11-19 19:08:15 +01:00
systemd-networkd.pkla networkd: allow networkd to set the timezone in timedated 2016-11-23 16:32:06 +01:00
systemd-networkd.rules networkd: allow networkd to set the timezone in timedated 2016-11-23 16:32:06 +01:00
test-network-tables.c networkd: clean up main header file a bit 2016-11-14 01:05:06 +01:00
test-network.c networkd/dhcp: shorten overlong hostname (#7616) 2017-12-13 18:00:46 +01:00
test-networkd-conf.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
test-routing-policy-rule.c test-routing-policy-rule: split out fd assignment from assert_se 2018-01-04 13:43:53 +01:00