1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-08 11:27:32 +03:00
Commit Graph

16130 Commits

Author SHA1 Message Date
Susant Sahani
31db01208b netowrkd:deserialize_dhcp_routes verify strndup ret
strndup need to be chcked
2014-06-29 22:22:35 +02:00
Tom Gundersen
46ba9fbae2 networkd: dhcp - update the lifetime of an existing address
The logic otherwise is that we leave anything preconfigured alone, but in the case of DHCP
we actually need to update it whenever the lease is renewed.
2014-06-29 17:01:23 +02:00
Tom Gundersen
fb41e6d7c6 sd-dhcp-client: don't fail hard if UDP socket can not be bound
Even if we cannot renew the lease at T1, we will likely succeed at T2, so warn and ignore the failure.

This could happen if for whatever reason the received address is not yet configured, or it has
been lost.
2014-06-29 16:42:43 +02:00
Tom Gundersen
b16665806a networkd: improve DHCP error logging 2014-06-29 16:34:43 +02:00
Tom Gundersen
1f87d09e98 units: local-fs.target - don't pull in default dependencies
Reported by Gerardo Exequiel Pozzi:

Looks like [commit a4a878d0] also changes a unrelated file
(units/local-fs.target) [partially]reverting the commit
40f862e3 (filesystem targets: disable default dependencies)

The side effect, at least in my case is that the "nofail" option in both
"crypttab" and "fstab" has partial effect does the default timeout
instead of continue normal boot without timeout.
2014-06-29 16:20:33 +02:00
Tom Gundersen
fb6730c498 networkd: set static addresses immediately
Don't wait for IPv4LL nor DHCP to finish before setting statically configured addresses.
2014-06-29 15:18:21 +02:00
Eugene Yakubovich
e1ea665eda Add support for DHCP static route options
This adds support for DHCP options 33 and 121: Static Route and
Classless Static Route. To enable this feature, set UseRoutes=true
in .network file. Returned routes are added to the routing table.
2014-06-29 15:18:21 +02:00
Tom Gundersen
ed942a9eb2 networkd: merge DHCPv4 and DHCPv6 config
If there are v4 or v6 specific options we can keep those in separate sections,
but for the common options, we will use only one.

Moreovere only use DHCP=[yes/both|no/none|v4|v6] to enable or disable the clients.
2014-06-29 15:18:21 +02:00
Patrik Flykt
68ceb9df6a sd-dhcp-client/networkd: set lifetimes for IPv4 addresses
Note that /proc/sys/net/ipv4/ip_dynaddr needs to be non-zero.

[tomegun: hook up DHCP renew events to increase the lifetime when necessary]
2014-06-29 15:18:21 +02:00
Tom Gundersen
7c16313f11 networkd/sd-dhcp-server: only start dhcp server when necessary 2014-06-29 15:18:21 +02:00
Jan Engelhardt
8e5edf8d42 doc: use expanded forms for written style 2014-06-28 00:06:31 -04:00
Jan Engelhardt
45df8656eb doc: typographical improvements and choice of words 2014-06-28 00:06:31 -04:00
Jan Engelhardt
8d0e0ddda6 doc: grammatical corrections 2014-06-28 00:06:30 -04:00
Zbigniew Jędrzejewski-Szmek
0fdeb6e011 units: remove RefuseManualStart from units which are always around
In a normal running system, non-passive targets and units used during
early bootup are always started. So refusing "manual start" for them
doesn't make any difference, because a "start" command doesn't cause
any action.

In early boot however, the administrator might want to start on
of those targets or services by hand. We shouldn't interfere with that.

Note: in case of systemd-tmpfiles-setup.service, really running the
unit after system is up would break the system. So e.g. restarting
should not be allowed. The unit has "RefuseManualStop=yes", which
prevents restart too.
2014-06-28 00:06:30 -04:00
Lennart Poettering
102bd40e1e man: split systemd.network(5) and related into various sections for better readability 2014-06-27 20:50:08 +02:00
Lennart Poettering
fed515f0a8 update TODO 2014-06-27 20:42:31 +02:00
Lennart Poettering
4bb278e51e man: document automatic networkd IP range allocation 2014-06-27 20:42:06 +02:00
Tom Hirst
52fb538361 rules: don't enable usb pm for Avocent devices
The Avocent KVM over IP devices doesn't work correctly with USB power
management enabled.
2014-06-27 20:02:15 +02:00
Kay Sievers
8a7a0c19ed libudev: queue - watch entire directory to allow the re-use of the watch descriptor 2014-06-27 19:56:31 +02:00
Lennart Poettering
dc6d4ea9a6 update TODO 2014-06-27 19:56:11 +02:00
Michał Bartoszkiewicz
e150e82097 journald: make MaxFileSec really default to 1month
journald.conf(5) states that the default for MaxFileSec is one month,
but the code didn't respect that.
2014-06-27 19:55:47 +02:00
Lennart Poettering
b1317b34f4 man: fix sd_watchdog_enabled() prototype in man page
https://bugs.freedesktop.org/show_bug.cgi?id=80597
2014-06-27 19:51:14 +02:00
Lennart Poettering
06b08e6597 update TODO 2014-06-27 19:38:21 +02:00
Lennart Poettering
b59233e6a3 coredump: simplify compression logic a bit
This also make sure we remove the original coredump temporary file if we
successfully managed to compress the coredump.
2014-06-27 19:35:57 +02:00
Lennart Poettering
8c9571d0ae coredump: replace Compression= setting by simpler Compress= boolean setting
Let's move things closer to journald's configuration settings, which
knows Compress= already, as a boolean. This makes things more uniform,
but also gives us more freedom to possibly swap out the used compression
algorithm one day.
2014-06-27 19:35:57 +02:00
Lennart Poettering
cf677ac1b7 coredump: don't expose the compression level as configuration option
This sounds overly low-level and implementation-detaily. Let's just
use the default level XZ suggests. This gives us more room to possibly
swap out the compression algorithm used, as the compression level range
will not leak into user configuration.
2014-06-27 19:35:57 +02:00
Lennart Poettering
168562d7ed journald: invoking fstatvfs() is now redundant in the vacuuming code 2014-06-27 19:35:57 +02:00
Lennart Poettering
9d951bf491 coredump: don't be annoyed if another coredump hook removes our coredump while we work on it 2014-06-27 19:35:57 +02:00
Lennart Poettering
cfc194575b coredump: fix how the compression level is verified 2014-06-27 19:35:57 +02:00
Lennart Poettering
2298116285 update TODO 2014-06-27 19:35:57 +02:00
Lennart Poettering
0dc5d23c85 coredump: add simple coredump vacuuming
When disk space taken up by coredumps grows beyond a configured limit
start removing the oldest coredump of the user with the most coredumps,
until we get below the limit again.
2014-06-27 19:35:57 +02:00
Lennart Poettering
1f97091d3c main: uid_to_name() might fail due to OOM, protect against that 2014-06-27 19:35:57 +02:00
Kay Sievers
14cb733684 libudev: queue provide file descriptor to watch busy event queue 2014-06-27 17:56:41 +02:00
Kay Sievers
45e60962b7 libudev: fix udev_queue_get_queue_is_empty() logic 2014-06-27 14:21:29 +02:00
Thomas Hindoe Paaboel Andersen
d0c8806d4a coredumpctl: fix potential deref of null pointer 2014-06-27 00:17:58 +02:00
Thomas Hindoe Paaboel Andersen
7849c2acd4 coredump: make sure variable is set if uncompressed
reorder the code so the fstat is done before we can jump to
uncompressed
2014-06-27 00:17:58 +02:00
Thomas Hindoe Paaboel Andersen
de8f6e5463 coredumpctl: remove unused variable 2014-06-26 23:16:58 +02:00
Thomas Hindoe Paaboel Andersen
2bb9a7a286 coredump: fix debug message
typo from 347272731e
2014-06-26 23:16:58 +02:00
Patrik Flykt
37d8b536d0 TODO: Add items for the DHCPv6 implementation 2014-06-26 16:10:58 +03:00
Patrik Flykt
ed6ee21953 sd-dhcp6-client: Implement Rapid Commit
Add a Rapid Commit option to Solicit messages and expect a Reply to
be received instead of an Advertise. When receiving a DHCPv6 message
from the server in state Solicit, continue testing whether the
message is a Reply. Ease up the message type checking, it's not fatal
if the message is of a wrong type.

Add helper functions to set/get the rapid commit of a lease. See
RFC 3315, sections 17., 17.1.2., 17.1.4. and 18.1.8.
2014-06-26 16:10:47 +03:00
Patrik Flykt
3dc34fcc97 sd-dhcp6-client: Implement Renew and Rebind
Start sending Renew and Rebind DHCPv6 messages when respective timers T1
and T2 expire. Rebind messages do not include a Server ID option and the
Rebind procedure ends when the last IPv6 address valid lifetime expires,
whereafter the client restarts the address acquisition procedure by
Soliciting for available servers.

See RFC 3315, sections 18.1.3. and 18.1.4. for details.
2014-06-26 16:10:38 +03:00
Patrik Flykt
709d6710d0 sd-dhcp6-lease: Add helper function to compute remaining expiry time
Create a helper function to compute the remaining time in seconds from
time T2 to the IPv6 address with the longest lifetime. The computed
time is used as the Maximum Retransmission Duration in Rebinding state.
See RFC 3315, section 18.1.4. for details.
2014-06-26 16:10:21 +03:00
Patrik Flykt
da6fe470e1 sd-dhcp6-client: Add Option Request Option support
Provide a function to request more options from the DHCPv6 server.
Provide a sensible default set at startup and add test basic test
cases for the intended usage.

Define DNS and NTP related option codes and add comments for the
unassigned codes.
2014-06-26 16:10:11 +03:00
Patrik Flykt
1873a3d344 networkd: Properly stop router solicitation and DHCPv6 client
When a link fails or looses carrier, always stop ongoing router
solicitation and any DHCPv6 client that may be running.
2014-06-26 16:09:50 +03:00
Patrik Flykt
836cf0905c sd-icmp6-nd: Add function to stop ongoing ICMPv6 discovery
In some use cases stopping an ongoing ICMPv6 discovery is more
useful than always unreferencing the whole structure.
2014-06-26 16:09:40 +03:00
Patrik Flykt
3f0c075f8e sd-dhcp6-client: return NULL from _unref() like the other sd-* libraries
In order to keep the refcounting working, a DONT_DESTROY macro similar
to the one in sd-bus has been added also to DHCPv6.
2014-06-26 16:09:29 +03:00
Michał Bartoszkiewicz
bd34b310fb timer: name the stamp file consistently
The stamp file for systemd --user timers was named stamp-foo.timer if
XDG_DATA_HOME was unset, but foo.timer otherwise.
2014-06-26 07:18:27 -04:00
Daniel Mack
8ac8c5817f coredumpctl: fix HAVE_XZ check 2014-06-26 10:35:52 +02:00
Daniel Mack
2fb8159fb3 coredumpctl: fix build with !HAVE_XZ
Fixes the following build error:

  CCLD     coredumpctl
src/journal/coredumpctl.o: In function `save_core':
/src/systemd-master/src/journal/coredumpctl.c:656:
undefined reference to `decompress_stream'
collect2: error: ld returned 1 exit status
make[2]: *** [coredumpctl] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
2014-06-26 10:31:23 +02:00
Uoti Urpala
375ae4aa4d core/transaction: fix cycle break attempts outside transaction
Patch fixes some incorrect-looking code in transaction.c.
It could fix cases where Debian users with bad package configurations
had systemd go into an infinite loop printing messages about breaking an
ordering cycle, though I have not reproduced that problem myself.

transaction_verify_order_one() considers jobs/units outside current
transaction when checking whether ordering dependencies cause cycles.
It would also incorrectly try to break cycles at these jobs; this
cannot work, as the break action is to remove the job from the
transaction, which is a no-op if the job isn't part of the transaction
to begin with. The unit_matters_to_anchor() test also looks like it
would not work correctly for non-transaction jobs. Add a check to
verify that the unit is part of the transaction before considering a
job a candidate for deletion.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=752259
2014-06-26 01:41:05 -04:00