| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Fixes #20741.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a small cosmetic change.
Before:
Offered DHCP leases: 192.168.0.183 (to 0:9:a7:36:bc:89)
After:
Offered DHCP leases: 192.168.0.183 (to 00:09:a7:36:bc:89)
|
|
|
|
|
|
| |
additional 64bit timeval or timespec
Fixes #20482 and #20564.
|
|
|
|
| |
Follow-up for 3691bcf3c5eebdcca5b4f1c51c745441c57a6cd1.
|
|
|
|
| |
Closes #20341.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This fixes a bug introduced by 99f1d3fc5043b33dea5faa88f7015a487965333f.
Note that in the information requesting mode, the lease has neither
addresses nor PD prefixes.
|
|
|
|
| |
Fix bug introduced by b47fb949b338a8e77be789542fffb8c86da79284.
|
|
|
|
| |
This also adds several debug log messages.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In general we almost never hit those asserts in production code, so users see
them very rarely, if ever. But either way, we just need something that users
can pass to the developers.
We have quite a few of those asserts, and some have fairly nice messages, but
many are like "WTF?" or "???" or "unexpected something". The error that is
printed includes the file location, and function name. In almost all functions
there's at most one assert, so the function name alone is enough to identify
the failure for a developer. So we don't get much extra from the message, and
we might just as well drop them.
Dropping them makes our code a tiny bit smaller, and most importantly, improves
development experience by making it easy to insert such an assert in the code
without thinking how to phrase the argument.
|
|\
| |
| | |
Add macros that define scratch buffer internally for timestamp/timespan formatting
|
| | |
|
| | |
|
|/
|
|
| |
Yet another batch of Coccinelle fixes.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
See RFC 5227 section 2.1.1.
This introduces a callback which intend to a library user, e.g.
networkd, checks whether the sender hardware address is a MAC address of
the host's intrerface or not.
|
| |
|
|
|
|
| |
IPV4ACD_STATE_STARTED
|
|
|
|
| |
This also makes sd_ipv4acd_set_mac() refuses null MAC address.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This makes DHCP client ignore FORCERENEW requests, as unauthenticated
FORCERENEW requests causes a security issue (TALOS-2020-1142, CVE-2020-13529).
Let's re-enable this after RFC3118 (Authentication for DHCP Messages)
and/or RFC6704 (Forcerenew Nonce Authentication) are implemented.
Fixes #16774.
|
|
|
|
| |
Previously, such situation is handled silently.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We recently started making more use of malloc_usable_size() and rely on
it (see the string_erase() story). Given that we don't really support
sytems where malloc_usable_size() cannot be trusted beyond statistics
anyway, let's go fully in and rework GREEDY_REALLOC() on top of it:
instead of passing around and maintaining the currenly allocated size
everywhere, let's just derive it automatically from
malloc_usable_size().
I am mostly after this for the simplicity this brings. It also brings
minor efficiency improvements I guess, but things become so much nicer
to look at if we can avoid these allocation size variables everywhere.
Note that the malloc_usable_size() man page says relying on it wasn't
"good programming practice", but I think it does this for reasons that
don't apply here: the greedy realloc logic specifically doesn't rely on
the returned extra size, beyond the fact that it is equal or larger than
what was requested.
(This commit was supposed to be a quick patch btw, but apparently we use
the greedy realloc stuff quite a bit across the codebase, so this ends
up touching *a*lot* of code.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
supposed-to-be-public APIs
This drops the "const" specifier from the opaque object parameters to
various functions in our API.
This effectively reverts #19292 and more.
Why drop this? Our public APIs should not leak too much information
about how stuff is implemented internally. In our public APIs we
shouldn't give too many guarantees we don#t want to necessarily keep.
Specifically: in many cases it makes sense that getters actually
generate/parse/allocate data on the fly, storing/caching the result
internally, to speed things up, do things lazily or to track memory
allocations so that they can be freed later. Doing this means we need to
change the objects, even though the getters are semantically a read
operation.
We want to retain the freedom that we can change things around
internally. By exposing the objects as "const" we remove a good chunk of
that, for little gain.
See sd_bus_creds_get_description() for a real example of a getter that
implicitly caches and thus modifies the relevant object.
This removes the "const" decorators from sd-dhcp and sd-netlink, two
APIs that we intend to make public eventually even though they still are
not, leaving us the chance to still fix this before it becomes set in
stone.
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| | |
keszybz/check-return-values-from-log_errno-functions
Check return values from log_errno functions
|
| | |
|
| |
| |
| |
| | |
No functional change.
|
| | |
|