Commit graph

14694 commits

Author SHA1 Message Date
Lennart Poettering c550f7a9b8 Merge pull request #2664 from zonque/bootchart-removal
Remove systemd-bootchart
2016-02-23 20:27:59 +01:00
Lennart Poettering d971033f6b Merge pull request #2708 from vcaputo/journal-restore-offline-state-on-error
journal: restore offline state on error
2016-02-23 16:55:16 +01:00
Lennart Poettering 0ab0c01490 Merge pull request #2717 from keszybz/networkctl-prettification
Networkctl prettification
2016-02-23 16:54:52 +01:00
Zbigniew Jędrzejewski-Szmek 4c3160f150 networkctl: only print lldp legend for capabilities that were actually seen 2016-02-23 08:50:52 -05:00
Zbigniew Jędrzejewski-Szmek 6b0132e4e7 basic: simplify ether_addr_is_null 2016-02-23 08:50:49 -05:00
Zbigniew Jędrzejewski-Szmek 953d28cc21 Fix two typos 2016-02-23 08:48:22 -05:00
Daniel Mack 4c2bb6b3b3 architecture.h: remove PROC_CPUINFO_MODEL
This was only needed for bootchart, so it can go now.
2016-02-23 13:31:28 +01:00
Daniel Mack 232c84b2d2 Remove systemd-bootchart
This commit rips out systemd-bootchart. It will be given a new home, outside
of the systemd repository. The code itself isn't actually specific to
systemd and can be used without systemd even, so let's put it somewhere
else.
2016-02-23 13:30:09 +01:00
Martin Pitt a9ae070941 Merge pull request #2709 from vcaputo/normalize_inc_dec_usage
tree-wide: make ++/-- usage consistent WRT spacing
2016-02-23 08:45:54 +01:00
Martin Pitt 548bd139fe Merge pull request #2698 from poettering/personality
Personality fixes
2016-02-23 08:19:20 +01:00
Vito Caputo 313cefa1d9 tree-wide: make ++/-- usage consistent WRT spacing
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.
2016-02-22 20:32:04 -08:00
Vito Caputo ec9ffa2cdd journal: restore offline state on error
If we fail to create the thread, technically we should leave the
offline_state as OFFLINE_JOINED, not OFFLINE_SYNCING.
2016-02-22 20:00:13 -08:00
Lennart Poettering 4d080d7798 Merge pull request #2701 from keszybz/udev-rules
udev-rules cleanup fix
2016-02-22 23:25:36 +01:00
Lennart Poettering 26fbedd7dc tests: add personality tests 2016-02-22 23:23:06 +01:00
Lennart Poettering 0c0fea07b8 util-lib: simplify personality() string matching 2016-02-22 23:23:06 +01:00
Lennart Poettering d5b687e7c2 virt: make sure we don't ignore some errors 2016-02-22 23:23:06 +01:00
Lennart Poettering f2d1736c60 util-lib: support various ppc archs in personality logic 2016-02-22 23:23:06 +01:00
Lennart Poettering 6e5f1b5742 util-lib: use the architecture ids from architecture.h for personalities
We have this ids, hence let's use them universally.
2016-02-22 23:23:06 +01:00
Lennart Poettering 0f9ae7d73d build-sys: move shared/architecture.[ch] into basic/
After all, it is pretty generic, has no external deps besides libc, and is very
similar to virt.[ch] which is also in basic/
2016-02-22 23:23:06 +01:00
Zbigniew Jędrzejewski-Szmek 916a8d4341 udev-rules: fix querying of attributes
faccessat returns 0 on success.

A cosmetic fix is also included: the slash was doubled unnecessarily.
2016-02-22 13:21:32 -05:00
Tom Gundersen 7c7c0cbe64 Merge pull request #2685 from poettering/lldp-fixes2
lldp fixes, second iteration
2016-02-22 17:38:34 +01:00
Lennart Poettering a4ae7f1d73 Merge pull request #2695 from mustrumr/fix-calendarspec-skip
calendarspec: fix find_next skipping times
2016-02-22 16:16:05 +01:00
Zbigniew Jędrzejewski-Szmek 83ea2049fc Merge pull request #2692 from ssahani/tunnel
networkd: tunnel fix tunnel address
2016-02-22 08:59:39 -05:00
Lennart Poettering 3535ed5949 Merge pull request #2694 from zonque/proxyarp-missing
missing.h: Explicitly check for IFLA_BRPORT_PROXYARP
2016-02-22 14:33:27 +01:00
Hristo Venev a022d76e6a calendarspec: fix find_next skipping times
reset usec when bumping hours/minutes
2016-02-22 08:02:48 -05:00
Daniel Mack 26c34ab4ee missing.h: Explicitly check for IFLA_BRPORT_PROXYARP
RHEL explicitly disables IFLA_BRPORT_PROXYARP by renaming the enum value.

In order to support unpatched builds, we have two options:

a) redefine the enum value through missing.h and ignore the fact that it
   is really unsupported, or

b) omit that enum value on rtnl_prot_info_bridge_port_types[]

As we are not actually using this netlink type anywhere, and because it
is only hooked up for the sake of completeness, this patch opts for the
former.
2016-02-22 13:22:30 +01:00
Daniel Mack 357726c8be Merge pull request #2687 from poettering/resolved-fix-2683
networkd: make sure we allocate the NTA set before we add items to it
2016-02-22 09:59:07 +01:00
Zbigniew Jędrzejewski-Szmek 493070f3dc Merge pull request #2688 from poettering/calendar-fix-2678
A fix for #2678
2016-02-21 21:29:41 -05:00
Lennart Poettering e308ddcae2 util-lib: fix returned error code
Make sure we propagate errors properly.
2016-02-21 23:27:20 +01:00
Lennart Poettering ea3894c1ba util-lib: add (void) cast to indicate that we don't care about the normalization success
After all, we verify that every calendar part is not out of bounds later on,
and it's fully OK if the normalization has no effect.
2016-02-21 23:25:38 +01:00
Lennart Poettering cbbf38aefc networkd: make sure we allocate the NTA set before we add items to it
See: #2683
2016-02-21 22:27:01 +01:00
Lennart Poettering 1f210bdbe6 Merge pull request #2650 from vcaputo/async_fsync
Perform journal offlines asynchronously when possible
2016-02-21 21:35:50 +01:00
Lennart Poettering 90dffb2241 sd-lldp: beef up callback logic
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.
2016-02-21 20:58:59 +01:00
Lennart Poettering d08191a242 networkctl: ellipsize long LLDP fields in table output 2016-02-21 20:58:59 +01:00
Lennart Poettering f5207c2206 networkctl: add missing newline to printf() format string 2016-02-21 20:58:59 +01:00
Lennart Poettering 8e1ad1eaf7 networkd: add basic LLDP transmission support
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.
2016-02-21 20:58:59 +01:00
Lennart Poettering b553a6b13c sd-lldp: filter out LLDP messages coming from our own MAC address
Let's not get confused should we be connected to some bridge that mirrors back
our packets.
2016-02-21 20:40:58 +01:00
Lennart Poettering 33859a6bf5 import: don't claim we had copied a settings file if we didn't 2016-02-21 20:40:57 +01:00
Lennart Poettering b9d74c40c6 networkd: make a couple of functions static
These functions are nowadays used only within networkd-link.c, hence ther's no
point in littering our public namespace with them.
2016-02-21 20:40:57 +01:00
Lennart Poettering 273eec24f5 networkd: rework when LLDP reception is enabled
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.
2016-02-21 20:40:57 +01:00
Lennart Poettering 58fb367825 networkctl: print a nice warning when networkd isn't running 2016-02-21 20:40:57 +01:00
Lennart Poettering 33d5013db0 networkctl: if there's no data from networkd about an iface show as "unmanaged"
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.)
2016-02-21 20:40:57 +01:00
Lennart Poettering 5f02f341c0 sd-network: use xsprintf() instead of asprintf() where we can 2016-02-21 20:40:57 +01:00
Lennart Poettering 4abd866d68 networkctl: add a couple of (void) casts
Where we knowingly ignore possible error results, let's cast to void.
2016-02-21 20:40:57 +01:00
Lennart Poettering b295beea88 networkd: rework how carrier bindings are serialized
Instead of serializing the interface name, expose the interface index, since
that's the only stable identifier.
2016-02-21 20:40:57 +01:00
Lennart Poettering 7cececb2ea networkd: turn on LLDP reception by default, in "routers-only" mode
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.
2016-02-21 20:40:57 +01:00
Lennart Poettering 837f57da41 networkctl: extend "networkctl status" per-interface output to include LLDP info
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.
2016-02-21 20:40:57 +01:00
Lennart Poettering 691d4da98a networkctl: make use of xsprintf() where we can 2016-02-21 20:40:57 +01:00
Lennart Poettering 7e5a080a94 networkctl: simplify networkctl
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().
2016-02-21 20:40:57 +01:00
Lennart Poettering b147503eb4 networkctl: rework interface data acquisition
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.
2016-02-21 20:40:57 +01:00