Commit graph

261 commits

Author SHA1 Message Date
Yu Watanabe 0d5eb02134
Merge pull request #17478 from yuwata/split-network-internal
libsystemd-network: split network-internal.c
2020-11-27 09:04:19 +09:00
Yu Watanabe db9ecf0501 license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
Yu Watanabe 1929ed0e58 sd-network: move link_get_type_string() 2020-10-29 14:23:49 +09:00
Timo Rothenpieler f1f1714411 networkctl: use and print full hardware address
Intentionally not checking the iftype for the ieee_oui lookup to support
other ethernet-like devices.
2020-10-28 15:18:01 +01:00
Frantisek Sumsal d46b79bbe0 tree-wide: drop if braces around single line expressions as well 2020-10-09 15:11:55 +02:00
Zbigniew Jędrzejewski-Szmek 90e74a66e6 tree-wide: define iterator inside of the macro 2020-09-08 12:14:05 +02:00
Yu Watanabe df696b1413 networkctl: label command does not take any argument 2020-08-27 16:32:13 +09:00
Zbigniew Jędrzejewski-Szmek 955a632971 tree-wide: use sd_bus_error_has_names() in more places 2020-08-24 19:48:26 +02:00
Yu Watanabe 48c5398951 networkctl: do not ignore -EOPNOTSUPP when reading netlink message
If the kernel does not support alternative interface names, then
sd_netlink_message_read_strv() should just return -ENODATA.
2020-07-20 15:24:40 +09:00
Yu Watanabe ae5b779252 networkctl: sort alternative names 2020-07-20 15:24:40 +09:00
Yu Watanabe 43bf28741f network: drop doubled white space 2020-07-15 17:15:25 +09:00
fangxiuning 4b6607d949 table use table_log_print_error() instead of table_log_show_error 2020-07-08 15:16:52 +08:00
Lennart Poettering 9b71e4ab90 shared: actually move all BusLocator related calls to bus-locator.c 2020-06-30 15:09:19 +02:00
Filipe Brandenburger 41d1f469cf log: introduce log_parse_environment_cli() and log_setup_cli()
Presently, CLI utilities such as systemctl will check whether they have a tty
attached or not to decide whether to parse /proc/cmdline or EFI variable
SystemdOptions looking for systemd.log_* entries.

But this check will be misleading if these tools are being launched by a
daemon, such as a monitoring daemon or automation service that runs in
background.

Make log handling of CLI tools uniform by never checking /proc/cmdline or EFI
variables to determine the logging level.

Furthermore, introduce a new log_setup_cli() shortcut to set up common options
used by most command-line utilities.
2020-06-24 16:49:26 +02:00
Susant Sahani 3d0c8750c5 networkctl: display DHCPv4 server address 2020-06-23 19:13:06 +09:00
Yu Watanabe 862e710820 networkctl: use lease file to get DHCPv4 client ID 2020-06-23 19:13:05 +09:00
Yu Watanabe d41fa6ee91 networkctl: use lease file to get DHCPv4 address 2020-06-23 19:13:05 +09:00
Yu Watanabe 35cab5f99d networkctl: load DHCPv4 lease file and use timezone data from the lease file 2020-06-23 19:13:05 +09:00
Lennart Poettering 2a71d57f4e network: clean-up DHCP lease server data configuration
This is an attempt to clean up the POP3/SMTP/LPR/… DHCP lease server
data logic in networkd. This reduces code duplication and fixes a number
of bugs.

This removes any support for collecting POP3/SMPT/LPR servers acquired
via local DHCP client releases since noone uses that, and given how old
these protocols are I doubt this will change. It keeps support for
configuring them for the dhcp server however.

The differences between the DNS/NTP/SIP/POP3/SMTP/LPR configuration
logics are minimized.

This removes the relevant symbols from sd-network.h (which is an
internal API only at this point after all).

This is unfortunately not well test, given the old code for this had
barely any tests. But the new code should not perform worse at least,
and allow us to release, since it corrects some interfaces visible in
the .network configuration format.

Fixes: #15943
2020-06-18 13:08:18 +09:00
Susant Sahani 639118854f networkctl: Display DHCP6 DUID 2020-06-10 19:21:24 +02:00
Susant Sahani 331ee15f18 networkctl: DHCPv6 - display IAID 2020-06-09 19:58:36 +09:00
Susant Sahani 2153bbc81a networkctl: Display DHCP4 client ID 2020-06-08 07:09:32 +02:00
Marc-André Lureau d9ce1c2493 networkctl: print DHCP leases 2020-06-04 11:16:15 +02:00
Marc-André Lureau 090c923b4d networkctl: factor out link_get_property()
The next patch is going to reuse it.
2020-06-04 11:16:15 +02:00
Susant Sahani 7f20a9e5b9 networkctl: Add a range to address genmode 2020-05-21 09:25:16 +02:00
Lennart Poettering 201fa8f256
Merge pull request #15166 from ssahani/networkctl-ipvlan
networkctl: Add support to display ipvlan
2020-05-19 09:29:45 +02:00
Susant Sahani 851ef1ed56 networkctl: Add support to display ipvlan
```
build/networkctl status myipvlan1                                                                                                                                                        ─╯
● 26: myipvlan1
             Link File: /usr/lib/systemd/network/99-default.link
          Network File: n/a
                  Type: ether
                 State: off (unmanaged)
                Driver: ipvlan
            HW Address: 4e:c5:88:28:c1:c0
                   MTU: 1500 (min: 68, max: 65535)
                 QDisc: noop
                  Mode: L2 (bridge)
  Queue Length (Tx/Rx): 1/1

```
2020-05-18 19:07:04 +02:00
Susant Sahani b55818fd12 networkctl: Use bond util common functions 2020-05-17 10:02:03 +02:00
Susant Sahani 22ae6c7d9a networkctl: VXLan - display more properties 2020-05-17 09:54:25 +02:00
Susant Sahani cf217a0922 networkctl: Add support to display macvlan/macvtap mode 2020-05-14 17:35:56 +02:00
Vito Caputo 8a048c8c42 network: switch to BusLocator-oriented helpers
Mechanical substitution reducing some verbosity
2020-05-07 08:46:44 -07:00
Susant Sahani 828e653c48 networkctl: Add support to display LPR servers 2020-04-22 14:50:27 +02:00
Susant Sahani 659f85a519 networkctl: Add support to display VXLan remote address 2020-04-11 16:12:42 +02:00
Zbigniew Jędrzejewski-Szmek c83a5ead31 Merge pull request #15210 from ssahani/networkctl-up-down
Merging by hand because github refuses merging because "Rebasing the commits of
this branch on top of the base branch cannot be performed automatically as this
would create a different result than a regular merge.".
2020-04-02 11:21:25 +02:00
Susant Sahani ad1e288013 networkctl: Add support to display DHCP SMTP servers 2020-03-29 22:59:21 +02:00
Susant Sahani 9f4aafea37 networkctl: Add support to display DHCP pop3 servers 2020-03-28 03:34:27 +01:00
Susant Sahani c30ffcee9b networkctl: Add support to set link up and down 2020-03-26 19:42:03 +01:00
Zbigniew Jędrzejewski-Szmek 1ab2033804
Merge pull request #15224 from ssahani/geneve
networkctl: Display more geneve properties
2020-03-26 18:30:37 +01:00
Susant Sahani e7b38d7d5c networkctl: Display more geneve preperties 2020-03-25 14:52:52 +01:00
Susant Sahani a8389a3307 networkctl: Use string table for bridge state 2020-03-24 14:22:59 +01:00
Susant Sahani 12ef8fb6f1 networkctl: Add more bridge properties 2020-03-24 10:08:48 +01:00
Susant Sahani 1f807af6de networkctl: Add support to display SIP servers
```
❯ build/networkctl status veth99                                                                                                                                                           ─╯
● 17: veth99
                     Link File: /usr/lib/systemd/network/99-default.link
                  Network File: /usr/lib/systemd/network/veth99.network
                          Type: ether
                         State: routable (configured)
                        Driver: veth
                    HW Address: 1e:04:f8:b8:2f:d4
                           MTU: 1500 (min: 68, max: 65535)
                         QDisc: noqueue
  IPv6 Address Generation Mode: eui64
          Queue Length (Tx/Rx): 1/1
              Auto negotiation: no
                         Speed: 10Gbps
                        Duplex: full
                          Port: tp
                       Address: 192.168.5.35 (DHCP4)
                                fe80::1c04:f8ff:feb8:2fd4
                       Gateway: 192.168.5.1
                           DNS: 192.168.5.1
                           NTP: 192.168.5.1
                           SIP: 192.168.5.4
                                192.168.5.5
                     Time Zone: Europe/Berlin

Mar 21 23:26:32 Zeus systemd-networkd[671]: veth99: Link DOWN
Mar 21 23:26:32 Zeus systemd-networkd[671]: veth99: Lost carrier
Mar 22 10:25:35 Zeus systemd-networkd[671]: veth99: Link UP
Mar 22 10:25:35 Zeus systemd-networkd[671]: veth99: Gained carrier
Mar 22 10:25:36 Zeus systemd-networkd[671]: veth99: Gained IPv6LL
Mar 22 10:29:02 Zeus systemd-networkd[671]: veth99: Link DOWN
Mar 22 10:29:02 Zeus systemd-networkd[671]: veth99: Lost carrier
Mar 22 10:29:13 Zeus systemd-networkd[671]: veth99: Link UP
Mar 22 10:29:13 Zeus systemd-networkd[671]: veth99: Gained carrier
Mar 22 10:29:14 Zeus systemd-networkd[671]: veth99: Gained IPv6LL

```
2020-03-22 15:59:05 +01:00
Susant Sahani d69b62de44 networkctl: Add support to display IPv6 addrgenmode 2020-03-19 08:57:59 +01:00
Susant Sahani b1d6fe7055 networkctl: Add support to display bond 2020-03-18 16:12:07 +01:00
Susant Sahani 5712d689b9 networkctl: Add support to display vti and vti6 tunnels 2020-03-18 05:21:41 +01:00
Susant Sahani ad760bc1e7 networkctl: add support to display ip6gre, ip6gretap, ip6erspan 2020-03-18 04:27:09 +01:00
Susant Sahani 4d75ea1ea3 networkctl: Add support to display gre gretap and erspan 2020-03-17 14:31:54 +01:00
Susant Sahani 4e1a1991c6 networkctl: Add support to display geneve tunnel info 2020-03-17 12:47:51 +01:00
Susant Sahani dca352245b networkctl: Add support to show tunnel (ipip/sit) local and remote address 2020-03-17 19:45:41 +09:00
Anita Zhang a4f4a4e441
Merge pull request #15138 from ssahani/networkctl-vlan
networkctl: Add support to display vlan ID
2020-03-16 12:56:07 -07:00