Commit graph

2317 commits

Author SHA1 Message Date
Yu Watanabe 3db7d5d2bf network: fix double free() 2019-11-28 19:50:45 +01:00
Yu Watanabe f5c3892266
network: also assume Table=local for ipv6 route if Type=local, broadcast, anycast or nat (#14148)
Also, if Type=multicast and scope is not set, then assume Scope=link.

Fixes #14122.
2019-11-26 12:41:54 +09:00
Zbigniew Jędrzejewski-Szmek b014a6161a
Merge pull request #14064 from yuwata/network-unify-send-option-and-send-raw-option
network: unify SendOption= and SendRawOption=
2019-11-18 22:21:37 +01:00
Yu Watanabe 0e96961d62 network: unify config_parse_dhcp_server_option_data() and config_parse_dhcp_send_option() 2019-11-18 23:39:03 +09:00
Yu Watanabe 461dbb2fa9 dhcp: remove struct sd_dhcp_raw_option
sd_dhcp_raw_option and sd_dhcp_option are essentially equivalent.
2019-11-18 23:37:22 +09:00
Yu Watanabe d8b736bd0c network: rename SendRawOption= to SendOption=
As DHCPv4.SendOption= and DHCPServer.SendRawOption= take the same
format.
2019-11-18 23:35:48 +09:00
Yu Watanabe c00c3b64be network: add more error logs 2019-11-18 15:26:55 +01:00
Lennart Poettering 353b2baa20 tree-wide: clean up --help texts a bit
This cleans up and unifies the outut of --help texts a bit:

1. Highlight the human friendly description string, not the command
   line via ANSI sequences. Previously both this description string and
   the brief command line summary was marked with the same ANSI
   highlight sequence, but given we auto-page to less and less does not
   honour multi-line highlights only the command line summary was
   affectively highlighted. Rationale: for highlighting the description
   instead of the command line: the command line summary is relatively
   boring, and mostly the same for out tools, the description on the
   other hand is pregnant, important and captions the whole thing and
   hence deserves highlighting.

2. Always suffix "Options" with ":" in the help text

3. Rename "Flags" →  "Options" in one case

4. Move commands to the top in a few cases

5. add coloring to many more help pages

6. Unify on COMMAND instead of {COMMAND} in the command line summary.
   Some tools did it one way, others the other way. I am not sure what
   precisely {} is supposed to mean, that uppercasing doesn't, hence
   let's simplify and stick to the {}-less syntax

And minor other tweaks.
2019-11-18 15:14:43 +01:00
Yu Watanabe 586ec936c6 network: make SendOption= also take type field
This makes SendOption= and SendRawOption= takes values in the same
format.
2019-11-17 23:17:29 +09:00
Yu Watanabe 2e5580a8c1 network: rename DHCPRawOption to DHCPOptionDataType
And moves the definition from networkd-dhcp-server.[ch] to networkd-dhcp-common.[ch].
2019-11-17 23:00:11 +09:00
Yu Watanabe 599e10a1d2 network: fix logged error value 2019-11-17 22:51:06 +09:00
Yu Watanabe 62a7c3608e network: fix indentation 2019-11-17 22:45:38 +09:00
Tom Fitzhenry a0fa3ef7ff Error, rather than warn, if failing to start DHCP server
This would have made diagnosing https://github.com/systemd/systemd/issues/14050 easier.
2019-11-17 22:31:43 +09:00
Yu Watanabe 95081e08d7 network: split struct Prefix into Prefix and RoutePrefix 2019-11-05 22:31:20 +09:00
Yu Watanabe 471e126b25 network: fix memleak in route_prefix_free() 2019-11-05 10:48:15 +09:00
Yu Watanabe 095b3a7d90 network: fix typo 2019-11-05 10:43:43 +09:00
Yu Watanabe e7825b2359 network: fix invalid cleanup function 2019-11-05 10:39:15 +09:00
Yu Watanabe 9be6ae775f network: fix memleak 2019-11-05 09:41:03 +09:00
Yu Watanabe acb71754e1 network: use fix invalid free function
Fixes #13938.
2019-11-05 09:40:55 +09:00
Yu Watanabe 8e1e87a5de tree-wide: drop double newline 2019-11-04 00:30:32 +09:00
Yu Watanabe 455fa9610c tree-wide: drop string.h when string-util.h or friends are included 2019-11-04 00:30:32 +09:00
Yu Watanabe aab64de281
Merge pull request #13888 from ssahani/qdisc
tc qdisc: netem add support to duplicate packets.
2019-11-01 11:44:10 +09:00
Susant Sahani 6edfb1f540 tc: qdisc remove some duplicate code 2019-10-31 10:36:28 +01:00
Susant Sahani b9c5aa3c65 qdisc: netem add support to duplicate packets.
using this option the chosen percent of packets is duplicated before
queuing them
2019-10-31 10:36:28 +01:00
Yu Watanabe f5947a5e92 tree-wide: drop missing.h 2019-10-31 17:57:03 +09:00
Susant Sahani 564ca98484 networkd: dhcp server Support Vendor specific 43
Implementes https://tools.ietf.org/html/rfc2132

```
[DHCPServer]
SendRawOption=26:uint32:1400
SendRawOption=23:uint8:10

```
Frame 448: 350 bytes on wire (2800 bits), 350 bytes captured (2800 bits) on interface 0
Linux cooked capture
Internet Protocol Version 4, Src: 192.168.5.1, Dst: 192.168.5.11
User Datagram Protocol, Src Port: 67, Dst Port: 68
Dynamic Host Configuration Protocol (ACK)
    Message type: Boot Reply (2)
    Hardware type: Ethernet (0x01)
    Hardware address length: 6
    Hops: 0
    Transaction ID: 0x71f8de9d
    Seconds elapsed: 0
    Bootp flags: 0x0000 (Unicast)
    Client IP address: 0.0.0.0
    Your (client) IP address: 192.168.5.11
    Next server IP address: 0.0.0.0
    Relay agent IP address: 0.0.0.0
    Client MAC address: 1e:04:f8:b8:2f:d4 (1e:04:f8:b8:2f:d4)
    Client hardware address padding: 00000000000000000000
    Server host name not given
    Boot file name not given
    Magic cookie: DHCP
    Option: (53) DHCP Message Type (ACK)
        Length: 1
        DHCP: ACK (5)
    Option: (51) IP Address Lease Time
        Length: 4
        IP Address Lease Time: (3600s) 1 hour
    Option: (1) Subnet Mask (255.255.255.0)
        Length: 4
        Subnet Mask: 255.255.255.0
    Option: (3) Router
        Length: 4
        Router: 192.168.5.1
    Option: (6) Domain Name Server
        Length: 4
        Domain Name Server: 192.168.5.1
    Option: (42) Network Time Protocol Servers
        Length: 4
        Network Time Protocol Server: 192.168.5.1
    Option: (101) TCode
        Length: 13
        TZ TCode: Europe/Berlin
    Option: (43) Vendor-Specific Information
        Length: 9
        Value: 1701311a0431343030
    Option: (54) DHCP Server Identifier (192.168.5.1)
        Length: 4
        DHCP Server Identifier: 192.168.5.1
    Option: (255) End
        Option End: 255

```
2019-10-31 09:03:43 +09:00
Yu Watanabe 737f140546 network: cleanup header inclusion 2019-10-30 22:23:43 +09:00
Zbigniew Jędrzejewski-Szmek a2cc708a88 network: amend SendOption= to take a c-escaped string
No need to punish users by forcing them to do base64 encodings.
2019-10-30 09:13:38 +01:00
Zbigniew Jędrzejewski-Szmek 864edb39cf network: rename SendOptions= to SendOption=
The name with plural made more sense where multiple options could be specified
in one line. After changes in the pull request, this option only accepts one
value, so from users' POV it should be singular.

(The field in the data structure remains plural, because it actually stores
multiple values.)
2019-10-30 08:56:18 +01:00
Yu Watanabe 4ecdcb07c9 network: wait for QDiscs to be configured 2019-10-30 09:33:51 +09:00
Susant Sahani 0f5bd7fe24 network: introduce TrafficControl
Add network delay to a interface
2019-10-30 09:33:51 +09:00
David Pedersen e6d6645517 network-generator: Add missing help for --root 2019-10-29 09:22:45 +09:00
Yu Watanabe 78404d22cc network: support matching based on wifi interfece type 2019-10-25 16:43:18 +09:00
Yu Watanabe 8dc85c5ef1 networkctl: introduce reconfigure method 2019-10-24 14:23:12 +09:00
Yu Watanabe e4857ee2f2 networkctl: use format_ifname_full() 2019-10-24 14:20:48 +09:00
Yu Watanabe d56d6cb8ca networkctl: fix error message 2019-10-24 14:20:48 +09:00
Yu Watanabe 99b8517ca7 network: introduce Reconfigure() bus method 2019-10-24 14:20:48 +09:00
Yu Watanabe f39dbf28f3 network: include netinet/in.h to fix build error 2019-10-24 14:20:48 +09:00
Yu Watanabe a227674cfb networkctl: add reload command 2019-10-24 14:20:42 +09:00
Yu Watanabe e272b62136 network: also reload .netdev files 2019-10-24 14:18:16 +09:00
Yu Watanabe 7f06b3e1b9 network: add Reload() dbus method 2019-10-24 14:18:09 +09:00
Yu Watanabe 6f3ad94590
Merge pull request #13828 from keszybz/networkctl-print-wlan
networkctl support for ssid and bssid
2019-10-24 11:12:39 +09:00
Zbigniew Jędrzejewski-Szmek 8d07de2534 networkctl: print ssid and bssid 2019-10-24 00:02:43 +02:00
Zbigniew Jędrzejewski-Szmek 172353b110 networkctl: create the sd_device structure just once
This is mostly in preparation for future changes: a proper freeing function
is now called on the LinkInfo items.
2019-10-24 00:02:43 +02:00
Zbigniew Jędrzejewski-Szmek b492aea093 network: split out functions to get ssid and bssid 2019-10-24 00:02:41 +02:00
Yu Watanabe 69ec2fdd9c
Merge pull request #13807 from 1848/ip6gre_key_fix
networkd: Set key (IFLA_GRE_IKEY,IFLA_GRE_OKEY) on ip6gre interfaces.
2019-10-23 23:18:59 +09:00
Zbigniew Jędrzejewski-Szmek 510c4bb31f
Merge pull request #13142 from yuwata/network-wifi-ssid-support-nl80211
network: wifi ssid support with nl80211
2019-10-23 14:51:23 +02:00
Zbigniew Jędrzejewski-Szmek 516e9c802f networkctl: split out helper function 2019-10-23 12:29:04 +02:00
Zbigniew Jędrzejewski-Szmek ceb366df29 networkctl: show carrier in green for loopback iface
We don't ever expect anything different, so let's hightlight
that carrier in this case is OK.
2019-10-23 11:10:32 +02:00
1848 6ba0e7c8fe Set key (IFLA_GRE_IKEY,IFLA_GRE_OKEY) on ip6gre interfaces. 2019-10-20 00:25:58 +02:00