Commit graph

14751 commits

Author SHA1 Message Date
Tom Gundersen 155e8b9adc TODO 2014-03-20 20:19:59 +01:00
Tom Gundersen eb34d4af3f networkd: link - create dhcp and ipv4ll eagerly
Make sure the client objects exist for the lifetime of the Link.
2014-03-20 20:18:15 +01:00
Tom Gundersen c49b33aca6 networkd: update mac address in clients when it changes
Pass the mac address on to ipv4ll and dhcp clients so they always have
up-to-date information, and may react appropriately to the change.

Also drop setting the mac address from uevent, and only log when the
address actually changes.
2014-03-20 20:18:15 +01:00
Tom Gundersen 58ec2d3e6e sd-dhcp-client: do not reset 'secs' when entering INIT-REBOOT
Also keep start_time in sync, but that shouldn't matter.
2014-03-20 17:07:43 +01:00
Tom Gundersen 6236f49b23 sd-dhcp-client: don't pass around 'secs'
The value is stored in the client object, so get it there when needed.
2014-03-20 17:07:43 +01:00
Patrik Flykt d790d3f173 libsystemd-dhcp: Update client test case for client id and end option
Check that the client identifier is formatted as suggested in the
RFC and that the messages sent ends with an end option.
2014-03-20 10:56:29 +02:00
Patrik Flykt 9d7bf1d58c libsystemd-network: Don't unnecessarily send too long packets
Since the length used by options is known, send packets with no
extra padding.
2014-03-20 10:55:27 +02:00
Patrik Flykt 715c6a9acd libsystemd-network: Prepend hardware type byte to client identifier
Even though client identifiers SHOULD be treated as opaque objects by
DHCP servers, follow the recommendation of a hardware type field with
value 0x01 (ethernet) followed by the hardware address as described in
RFC 2132.
2014-03-20 10:54:31 +02:00
Lennart Poettering f1b2c3eccb update TODO 2014-03-20 04:19:23 +01:00
Lennart Poettering c2c13f2df4 unit: turn off mount propagation for udevd
Keep mounts done by udev rules private to udevd. Also, document how
MountFlags= may be used for this.
2014-03-20 04:16:39 +01:00
Lennart Poettering b5640d8245 update TODO 2014-03-19 23:25:41 +01:00
Lennart Poettering f21a71a907 core: enable PrivateNetwork= for a number of our long running services where this is useful 2014-03-19 23:25:28 +01:00
Lennart Poettering 7181dbdb2e core: move notify sockets to /run and $XDG_RUNTIME_DIR
A service with PrivateNetwork= cannot access abstract namespace sockets
of the host anymore, hence let's better not use abstract namespace
sockets for this, since we want to make sure that PrivateNetwork=
is useful and doesn't break sd_notify().
2014-03-19 22:46:45 +01:00
Lennart Poettering 907afa0682 man: improve documentation of fs namespace related settings 2014-03-19 22:26:08 +01:00
Lennart Poettering 7d711efb9c core: make sure we can combine DevicePolicy=closed with PrivateDevices=yes
if PrivateDevices=yes is used we need to make sure we can still
create /dev/null and so on.
2014-03-19 22:00:43 +01:00
Lennart Poettering a3d59cd1b0 sd-bus: don't use assert_return() to check for disconnected bus connections
A terminated connection is a runtime error and not a developer mistake,
hence don't use assert_return() to check for it.
2014-03-19 21:41:21 +01:00
Lennart Poettering 598459ceba core: rework context initialization/destruction logic
Let's automatically initialize the kill, exec and cgroup contexts of the
various unit types when the object is constructed, instead of
invididually in type-specific code.

Also, when PrivateDevices= is set, set DevicePolicy= to closed.
2014-03-19 21:06:53 +01:00
Lennart Poettering ae439c9f9b sd-bus: properly translate high-level attach flags into kdbus attach flags 2014-03-19 19:09:00 +01:00
Lennart Poettering 5a2e420c1f update TODO 2014-03-19 19:09:00 +01:00
Lennart Poettering b46a529c7c core: when PrivateTmp= is set for a unit, make sure to order it after /tmp and /var/tmp are mounted 2014-03-19 19:09:00 +01:00
Lennart Poettering d99a705296 units: make use of PrivateTmp=yes and PrivateDevices=yes for all our long-running daemons 2014-03-19 19:09:00 +01:00
Lennart Poettering 7973ca1927 update TODO 2014-03-19 16:25:11 +01:00
Lennart Poettering 2b85f4e19c core: Beef up PrivateDevices=
Also mount /dev/kdbus, /dev/mqueue and /dev/hugepages into the /dev for
namespaced services.
2014-03-19 16:25:11 +01:00
Lennart Poettering d0ce77344b busctl: when monitoring the bus, enable all credentials 2014-03-19 16:25:11 +01:00
Lennart Poettering 6af00e06e4 core: expose missing busname properties on the bus 2014-03-19 16:25:11 +01:00
Tom Gundersen 7bf2f43972 sd-dhcp-client: accept infinite lease lifetime
Otherwise we would fail with -EINVAL. Thanks to Brandon Philips
<brandon.philips@coreos.com>, for reporting the bug.
2014-03-19 10:41:29 +01:00
Patrik Flykt 8b1243f72e libsystemd-network: Add Init-Reboot support
Init-Reboot is tried if a client IP address has been given when
the DHCP client is started. In Init-Reboot, start by sending a
broadcast DHCP Request including the supplied client IP address
but without the server identifier. After sending the request,
enter Reboot state.

If a DHCP Ack is received, proceed to Bound state as usual. If a
DHCP Nak is received or the first timeout triggers, start the
address acquisition over from DHCP Init state.

See RFC 2131, sections 4.3.2, 4.4, 4.4.1 and 4.4.2 for details.
2014-03-19 10:52:40 +02:00
Patrik Flykt 0f941add36 libsystemd-network: Restart DHCP acquisition if the lease expires
This causes the DHCP client struct initialization and DHCP client
starting to be factored out into functions of their own.
2014-03-19 10:52:40 +02:00
Patrik Flykt 8fc8e3ab98 libsystemd-network: Add hangcheck timer for DHCP client test 2014-03-19 10:52:40 +02:00
Patrik Flykt a838c939a3 libsystemd-network: Export checksum function to test case
Remove identical checksum function implementation from the test
case code.
2014-03-19 10:52:40 +02:00
Lennart Poettering 4658568002 update TODO 2014-03-19 04:17:37 +01:00
Lennart Poettering 0936559234 sd-bus: add proper monitoring API 2014-03-19 04:17:00 +01:00
Lennart Poettering 4f10118016 core: by default .busname units should be activating 2014-03-19 03:09:51 +01:00
Lennart Poettering 622efd8775 update TODO 2014-03-19 02:28:03 +01:00
Daniel Mack 5892a914d1 busname: introduce Activating directive
Add a new config 'Activating' directive which denotes whether a busname
is actually registered on the bus. It defaults to 'yes'.

If set to 'no', the .busname unit only uploads policy, which will remain
active as long as the unit is running.
2014-03-19 02:25:36 +01:00
Lennart Poettering ec8408740a update TODO 2014-03-19 01:48:23 +01:00
Lennart Poettering d2e7b05f24 core: when creating an activating busname attach all metadata fields to the messages queued for it
This way we can be sure that the service the messages are ultimately
intended for finds all fields it might need.
2014-03-19 01:36:03 +01:00
Lennart Poettering f9d12d4439 update kdbus.h 2014-03-19 01:35:52 +01:00
Lennart Poettering 5f381b355a missing: define LO_FLAGS_PARTSCAN if it is missing
https://bugs.freedesktop.org/show_bug.cgi?id=76335
2014-03-19 01:10:14 +01:00
Lennart Poettering c4a7b2c56e util: add new FOREACH_STRING() macro as syntactic sugar to iterate through a number of fixed strings 2014-03-19 00:54:41 +01:00
Lennart Poettering cb9da7f24f update TODO 2014-03-18 21:06:08 +01:00
Lennart Poettering ce236b57be man: dcument sd_bus_negotiate_fds() and friends 2014-03-18 21:05:16 +01:00
Lennart Poettering 2ce97e2b04 sd-bus: if we got a message with fds attached even though we didn't negotiate it, refuse to take it
This makes sure we don't mishandle if developers specificy a different
AcceptFileDescriptors= setting in .busname units then they set for the
bus connection in the activated program.
2014-03-18 21:03:37 +01:00
Lennart Poettering 3f9da41645 core: add new AcceptFD= setting to .busname units
AcceptFD= defaults to true, thus making sure that by default fd passing
is enabled for all activatable names. Since for normal bus connections
fd passing is enabled too by default this makes sure fd passing works
correctly regardless whether a service is already activated or not.

Making this configurable on both busname units and in bus connections is
messy, but unavoidable since busnames are established and may queue
messages before the connection feature negotiation is done by the
service eventually activated. Conversely, feature negotiation on bus
connections takes place before the connection acquires its names.

Of course, this means developers really should make sure to keep the
settings in .busname units in sync with what they later intend to
negotiate.
2014-03-18 20:54:32 +01:00
Lennart Poettering 6340559506 test 2014-03-18 19:31:44 +01:00
Lennart Poettering 03e334a1c7 util: replace close_nointr_nofail() by a more useful safe_close()
safe_close() automatically becomes a NOP when a negative fd is passed,
and returns -1 unconditionally. This makes it easy to write lines like
this:

        fd = safe_close(fd);

Which will close an fd if it is open, and reset the fd variable
correctly.

By making use of this new scheme we can drop a > 200 lines of code that
was required to test for non-negative fds or to reset the closed fd
variable afterwards.
2014-03-18 19:31:34 +01:00
Lennart Poettering 9459781ee6 udate TODO 2014-03-18 17:59:11 +01:00
Lennart Poettering f1660f96f5 core: drop CAP_MKNOD when PrivateDevices= is set 2014-03-18 17:58:19 +01:00
Kay Sievers 45aee6d67a timedated: update test address 2014-03-18 16:20:39 +01:00
Kay Sievers 6080625dc8 hwdb: update 2014-03-18 16:20:39 +01:00