Age | Commit message (Collapse) | Author |
|
greedy_realloc() and greedy_realloc0() now store the allocated
size as the count, not bytes.
Replace GREEDY_REALLOC uses with GREEDY_REALLOC_T everywhere,
and then rename GREEDY_REALLOC_T to GREEDY_REALLOC. It is just
too error-prone to have two slightly different macros which do the
same thing.
|
|
Usually RUNNING implies LOWER_UP, but for drivers that don't support oper state, RUNNING can
also mean that the state is unknown. In that case we should just trust LOWER_UP directly.
|
|
The interface is not fully ready until it enterns RUNNING. This was causing
problems with sending out DHCP messages before the interface was ready, so they
would get lost. In particular this affected DHCP INIT-REBOOT, as it relies on
the first package sent being successful (or it will fall back to a full reboot).
Also improve the logging a lot, to make future debugging of link state a lot
easier.
|
|
These are redundant now that the REQUEST messages contain the same information.
|
|
Specify what kind of REQUEST we send, and distinguish between REBOOT and START.
Also log stop reasons as strings rather than numbers.
|
|
|
|
This error should never happen, so replace the check with an assert. The check
was anyway broken due to an uninitialized return value.
Reported by Thomas Hindoe Paaboel Andersen <phomes@gmail.com>.
|
|
Also reshuffle some code to make the correspondence with the RFC a bit more
obvious.
Small functional change: fail if we try to send a message from the wrong state.
|
|
|
|
As we are now filtering the raw socket based on the transaction id, we must
reset the BPF when we reset the transaction id.
|
|
Add an explicit stop state for IPv4LL so that the user can stop the
IPv4LL client from the callback. When returning from the callback,
check also the stop state in order to halt any further protocol
processing.
|
|
Similar to DHCP, the IPv4LL library user can decide to free the LL
client any time the callback is called. Guard against freeing the
LL client in the callback by introducing proper reference counting.
Also update code using the IPv4LL library to properly handle a
returned NULL from the notify and stop functions if the IPv4LL
client was freed.
|
|
Add an explicit stop state for the DHCP client so that the library
user can issue a stop at any time the callback has been called.
When returning from the callback, check also the stop state and
stop any further DHCP processing.
|
|
The DHCP library user can decide to free the DHCP client any time
the callback is called. After the callback has been called, other
computations may still be needed - the best example being a full
restart of the DHCP procedure in case of lease expiry.
Fix this by introducing proper reference counting. Properly handle
a returned NULL from the notify and stop functions if the DHCP
client was freed.
|
|
|
|
This unifies the socket handling with other sd-* libraries.
|
|
|
|
|
|
|
|
|
|
We still only return the first message part in callback/synchronous calls.
|
|
|
|
This test should have been updated when changing the magic cookie handling around.
Reported by Ken MacLeod.
|
|
change_uid_gid() never initialises sz which may cause greedy_realloc to
skip the initial buffer allocation.
|
|
systemd-machined doesn't store cgroup path in a state file anymore.
Let's figure it out from the scope.
|
|
Add Mir to the list of session types. This is implemented for LightDM
in lp:~robert-ancell/lightdm/xdg-session-desktop [1].
[1] https://code.launchpad.net/~robert-ancell/lightdm/xdg-session-desktop/+merge/214108
(david: adjusted commit-header and fixed whitespace issues)
|
|
Several units now utilize the PrivateNetwork parameter, which requires
network namespace support.
|
|
This should never be a problem, but better be safe than sorry.
|
|
|
|
I think it is easier to grok this way.
|
|
|
|
|
|
Improve the checksum computation by using 64 bit integers instead of the 16 bit
integers in the existing implementation. This change speeds up the computation
with approximately 78% both on 64 bit and 32 bit systems.
Please see RFC 1071 for details.
|
|
This should significantly reduce spurious wakeups.
|
|
Umut said: 'I have noticed a bug that we are sending PROBE/ANNOUNCE messages on
00:00:00:00:00:00 address where it should be broadcast.'
|
|
Try a bit harder to make the kernel drop packets not for us. This should reduce
the number of wakeups from n^2 to n in the number of dhcp clients, which admittedly
only makes a differenc in very extreme cases.
|
|
If they are too small to fit the IP+UDP+DHCP headers they can be of no use, so
don't waste resources parsing them. This is at the cost of losing some verbosity
in the logging.
|
|
Also move the checking of it to the main message handler, rather than the
options parser.
Fix a bug, so we now drop the packet if any of the magic bytes don't match.
Before we used to only drop the packet if they were all wrong.
|
|
|
|
Found with scan-build
|
|
|
|
A parameter which was always null before, now get's set to
the module.
|
|
It turns out the latter got removed in Python 3.
https://bugs.freedesktop.org/show_bug.cgi?id=77086
|
|
Reported-by: Arnaud Gaboury <arnaud.gaboury@gmail.com>
|
|
|
|
Return negative errno in wall_tty_block(). get_ctty_devnr() already
returns a negative errno in case of failure, no need to negate it again.
Reported-by: Simon <hwold@odai.homelinux.net>
|
|
Previously the man page was modified, but not help().
|
|
|
|
In "export" format, newlines are significant, and messages containing
newlines must be exported as "binary".
|
|
|