Age | Commit message (Collapse) | Author |
|
IPv6 protocol requires a minimum MTU of 1280 bytes on the interface.
This fixes #3046.
Introduce helper link_ipv6_enabled() to figure out whether IPV6 is enabled.
Introduce network_has_static_ipv6_addresses() to find out if any static
ipv6 address configured.
If IPv6 is not configured on any interface that is SLAAC, DHCPv6 and static
IPv6 addresses not configured, then IPv6 will be automatically disabled for that
interface, that is we write "1" to /proc/sys/net/ipv6/conf//disable_ipv6.
|
|
|
|
Fixes: #2889
|
|
We only use it for the Tx code anyway, hence sd-lldp.h shouldn't expose it, as
it only implements Rx.
|
|
Let's properly handle hashmap_put() failing.
|
|
CID #1349698.
|
|
Replace if with assert_cc in lldp code and a build-sys tweak
|
|
DHCP DUID parsing fix, logging fix, man-page fix
|
|
LLDP_TX_HOLD or one of the other variables might be changed in the future
resulting in a silent error here if the if was just removed.
Replacement for #2983.
|
|
1. Replace strtol with unhexchar, verified with valid and invalid DUID strings.
2. Fix logging to use log_syntax instead of log_error.
3. On error reading DUID, ignore read and preserve previous state.
4. Fix man-pages to use markup, remove options not yet implemented.
5. Remove spurious header line in new files.
|
|
For #2915.
|
|
|
|
|
|
lldp.h contains definitions of LLDP types, subtypes and capabilities which
should be exposed in public headers. Get rid of the file and move those
definitions to sd-lldp.h with the SD_ prefix.
|
|
|
|
|
|
Enable more tests by default, and even more with `--enable-tests=unsafe`
|
|
|
|
name is IFNAMSIZ bytes, but we would copy sizeof(info->name) bytes,
which is IFNAMSIZ + 1. In effect we would go outside of the source
buffer and possibly leave a non-null terminated string in info->name.
CID #1351754.
|
|
|
|
tree-wide: merge pager_open_if_enabled() to the pager_open()
|
|
Many subsystems define own pager_open_if_enabled() function which
checks '--no-pager' command line argument and open pager depends
on its value. All implementations of pager_open_if_enabled() are
the same. Let's merger this function with pager_open() from the
shared/pager.c and remove pager_open_if_enabled() from all subsytems
to prevent code duplication.
|
|
tree-wide: minor formatting inconsistency cleanups
|
|
|
|
|
|
Networkctl prettification
|
|
|
|
Throughout the tree there's spurious use of spaces separating ++ and --
operators from their respective operands. Make ++ and -- operator
consistent with the majority of existing uses; discard the spaces.
|
|
lldp fixes, second iteration
|
|
networkd: tunnel fix tunnel address
|
|
See: #2683
|
|
Instead of just notifying about the fact that something changed in the
database, actually inform the callback what precisely changed. This is useful,
so that the LLDP tx logic can be put into "fast" mode as soon as a previously
unknown peer appears, as suggested by the LLDP spec.
|
|
|
|
|
|
Let's add some minimalistic LLDP sender support. The idea is that this is
either on or off, and all fields determined automatically rather than
configured explicitly.
|
|
Let's not get confused should we be connected to some bridge that mirrors back
our packets.
|
|
These functions are nowadays used only within networkd-link.c, hence ther's no
point in littering our public namespace with them.
|
|
Being on the link-layer LLDP is nothing we should turn on only when there's a
link beat. Instead, turn it on, whenever the iface is UP regardless if there's
a link beat or not. This closes the race between a link beat being available
and us subscribing to LLDP as a result.
|
|
|
|
After all, if we know that an interface exists but networkd did not store any
info about it, then it's definitely unmanaged by it.
(Note that we add this fix-up to networkctl, and not to sd-network, simply
because a missing file might also be result of the interface not existing.)
|
|
Where we knowingly ignore possible error results, let's cast to void.
|
|
Instead of serializing the interface name, expose the interface index, since
that's the only stable identifier.
|
|
This way "networkctl status" becomes a bit more useful by default, as router
information is just visible, without any further configuration.
LLDP reception is fully passive and relatively low simple and low traffic,
hence this should be safe to enable by default.
|
|
This adds a small and useful field to the "systemctl status" output: the
router(s) the interface is connected to as reported via LLDP. Example output:
● 2: enp0s25
Link File: /usr/lib/systemd/network/99-default.link
Type: ether
State: degraded (configured)
Path: pci-0000:00:19.0
Driver: e1000e
Connected To: GS1900 on port 2 (foobar)
i.e. the last line is the relevant one.
|
|
|
|
Move decode_and_sort_links() into acquire_info_all() which is the only place
this is used. The result is then nicely symmetric to acquire_info_strv().
|
|
Let's always use the same calls to acquire interface data. Specifically port
"networkctl status" to use acquire_link_info_strv() and acquire_link_info_all()
like the other calls.
|
|
interface names
This way, the output may be reduced to only show data about the specified
interfaces.
|
|
and "lldp" verbs
|
|
VERB_DEFAULT may only appear once.
|