Yu Watanabe
714a199e48
network: add one more section validty check
...
Follow-up for 203d4df573
.
2019-09-21 20:17:15 +09:00
Chris Down
de307e199b
networkd: Fix SIP double-free
...
This is already strv_freed right above
2019-09-20 15:15:04 +02:00
Susant Sahani
299d578f7f
network: DHCP server Add support to transmit SIP server
...
1. DHCP server trasmit
2. Client parses and saves in leases
Implements http://www.rfc-editor.org/rfc/rfc3361.txt
```
Frame 134: 348 bytes on wire (2784 bits), 348 bytes captured (2784 bits) on interface 0
Ethernet II, Src: 42:65:85:d6:4e:32 (42:65:85:d6:4e:32), Dst: 1e:04:f8:b8:2f:d4 (1e:04:f8:b8:2f:d4)
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: 0x7cc87cb4
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.1.1
Option: (120) SIP Servers <=====here
Length: 9
SIP Server Encoding: IPv4 Address (1)
SIP Server Address: 192.168.1.1
SIP Server Address: 192.168.5.2
Option: (101) TCode
Length: 13
TZ TCode: Europe/Berlin
Option: (54) DHCP Server Identifier (192.168.5.1)
Length: 4
DHCP Server Identifier: 192.168.5.1
Option: (255) End
Option End: 255
```
```
cat /run/systemd/netif/state ✔ ⚡ 3148 16:40:51
OPER_STATE=routable
CARRIER_STATE=carrier
ADDRESS_STATE=routable
DNS=192.168.94.2 192.168.5.1
NTP=192.168.5.1
SIP=192.168.1.1 192.168.5.2
```
aa
2019-09-20 21:22:23 +09:00
Susant Sahani
5bc945bec4
network dhcp4: Add support send request options in a generic manner
2019-09-20 21:05:48 +09:00
Susant Sahani
203d4df573
network: Add support to advertie ipv6 route
...
Implements https://tools.ietf.org/html/rfc4191
cat veth99.network
```
[Match]
Name=veth99
[Network]
DHCP=no
IPv6PrefixDelegation=yes
Address=2001:db8:0:1::1/64
[IPv6Prefix]
Prefix=2001:db8:0:1::4/64
[IPv6RoutePrefix]
Route=2001:db0:fff::/48
```
Wireshark
```
Frame 481: 142 bytes on wire (1136 bits), 142 bytes captured (1136 bits) on interface 0
Ethernet II, Src: 1e:04:f8:b8:2f:d4 (1e:04:f8:b8:2f:d4), Dst: IPv6mcast_01 (33:33:00:00:00:01)
Internet Protocol Version 6, Src: fe80::1c04:f8ff:feb8:2fd4, Dst: ff02::1
Internet Control Message Protocol v6
Type: Router Advertisement (134)
Code: 0
Checksum: 0xec77 [correct]
[Checksum Status: Good]
Cur hop limit: 0
Flags: 0x00, Prf (Default Router Preference): Medium
Router lifetime (s): 0
Reachable time (ms): 0
Retrans timer (ms): 0
ICMPv6 Option (Source link-layer address : 1e:04:f8:b8:2f:d4)
Type: Source link-layer address (1)
Length: 1 (8 bytes)
Link-layer address: 1e:04:f8:b8:2f:d4 (1e:04:f8:b8:2f:d4)
ICMPv6 Option (MTU : 1500)
Type: MTU (5)
Length: 1 (8 bytes)
Reserved
MTU: 1500
ICMPv6 Option (Prefix information : 2001:db8:0:1::4/64)
Type: Prefix information (3)
Length: 4 (32 bytes)
Prefix Length: 64
Flag: 0xc0, On-link flag(L), Autonomous address-configuration flag(A)
Valid Lifetime: 2592000
Preferred Lifetime: 604800
Reserved
Prefix: 2001:db8:0:1::4
ICMPv6 Option (Route Information : Medium 2001:db0:fff::/48)
Type: Route Information (24)
Length: 3 (24 bytes)
Prefix Length: 48
Flag: 0x00, Route Preference: Medium
...0 0... = Route Preference: Medium (0)
000. .000 = Reserved: 0
Route Lifetime: 604800
Prefix: 2001:db0:fff::
```
2019-09-17 12:09:59 +02:00
Zbigniew Jędrzejewski-Szmek
3af900718e
Merge pull request #13405 from yuwata/network-ipv6-privacy-extensions-cleanup
...
Network ipv6 privacy extensions cleanup
2019-09-13 18:03:29 +02:00
Yu Watanabe
be7110826e
network: do not abort execution when a config file cannot be loaded
...
Closes #13516 .
2019-09-11 21:15:22 +09:00
Yu Watanabe
44013aa4f5
network: add more warnings in network_verify()
2019-08-27 23:53:46 +09:00
Yu Watanabe
adfeee49c5
network: enable ipv6 when the network has static ipv6 configurations
2019-08-27 23:53:46 +09:00
Yu Watanabe
b146ad71cc
network: use DEFINE_STRING_TABLE_LOOKUP_WITH_BOOLEAN() macro at one more place
2019-08-26 16:19:02 +09:00
Yu Watanabe
2d79289525
network: rename AddressFamilyBoolean -> AddressFamily
...
We usually do not call an extended boolean as XxxBoolean.
2019-08-16 22:02:17 +09:00
Yu Watanabe
0aabccc87d
network: refuse the case To= and From= are in different address family
2019-08-16 22:01:17 +09:00
Yu Watanabe
044d4b4067
network: drop invalid [Neighbor] section earlier
2019-07-11 22:22:29 +09:00
Lennart Poettering
7e82b4059b
Merge pull request #13006 from yuwata/network-split-dhcp-12917
...
networkd: DHCPv6 - separate DHCPv6 options from DHCPv4 options
2019-07-11 10:28:03 +02:00
1848
98d20a17a9
Added support for xfrm interfaces
2019-07-10 23:02:19 +09:00
Susant Sahani
caa8ca4286
networkd: DHCPv6 - separate DHCPv6 options from DHCPv4 options
...
Closes https://github.com/systemd/systemd/issues/12917
2019-07-10 16:59:29 +09:00
Zbigniew Jędrzejewski-Szmek
8fabb625ac
Merge pull request #12912 from yuwata/network-move-functions
...
network: move functions
2019-07-02 09:46:38 +02:00
Yu Watanabe
44005bfb4e
network,udev: add Property= setting in [Match] section
...
Closes #5665 .
2019-07-01 01:24:42 +09:00
Yu Watanabe
b38de0e9cc
network,udev: make net_match_config() take sd_device
2019-07-01 01:24:42 +09:00
Yu Watanabe
8fcf1d6180
network: move DHCP server related functions to networkd-dhcp-server.c
2019-06-30 04:46:27 +09:00
Yu Watanabe
ca5ad760a5
network: move conf parsers and function prototypes
2019-06-30 04:45:56 +09:00
Yu Watanabe
95355a281c
network: add KeepConfiguration=dhcp-on-stop
...
The option prevents to drop lease address on stop.
By setting this, we can safely restart networkd.
2019-06-06 22:50:29 +09:00
Susant Sahani
7da377ef16
networkd: add support to keep configuration
2019-06-06 22:50:29 +09:00
Susant Sahani
e520ce6440
networkd: Ability to selectively ignore IPv6 prefixes supplied via router advertisement
...
Closes https://github.com/systemd/systemd/issues/10647
2019-05-19 22:23:06 +09:00
Yu Watanabe
cdd22d5129
network: set_put() here does not returns -EEXIST
2019-05-18 12:46:02 +09:00
Yu Watanabe
a32a00831c
Merge pull request #12574 from yuwata/network-mtu-issue-12552
...
network: do not always bump MTU with additional 4bytes
2019-05-16 08:25:48 +02:00
Yu Watanabe
933c70a0a4
network: honor MTUBytes= setting
...
Closes #12552 .
2019-05-16 11:47:41 +09:00
Susant Sahani
69c317a07f
networkd: introduce netdev ipvtap
...
This patch adds netdev ipvtap that is based on the
IP-VLAN network interface, called ipvtap. An ipvtap device can be created
in the same way as an ipvlan device, using 'kind ipvtap', and then accessed
using the tap user space interface.
2019-05-16 09:48:53 +09:00
Yu Watanabe
5d5003ab35
network: add DefaultRouteOnDevice= setting in [Network] section
...
When enabled, then default route bound to the interface will be created.
This is useful when adding routes on point-to-point interfaces.
Closes #788 .
2019-05-15 12:44:30 +09:00
Yu Watanabe
8e2cb51ce0
network: move MulticastRouter to netdev/bridge.[ch]
2019-05-11 06:24:04 +09:00
Yu Watanabe
7f8539504c
network: move sd_lldp related functions to networkd-lldp-rx.c
2019-05-11 06:14:39 +09:00
Yu Watanabe
5af7bc6f4c
Merge pull request #12480 from ssahani/proxy-arp
...
network: bridge add support to configure proxy ARP/WIFI
2019-05-10 15:30:41 +02:00
Susant Sahani
727b573418
networkd: Add support for blacklisting servers
...
closes #6260
fuzzer: Add DHCP support for blacklisting servers
2019-05-10 15:29:55 +02:00
Susant Sahani
0fadb2a46f
network: add support to configure proxy ARP/WIFI
2019-05-09 15:03:04 +09:00
Yu Watanabe
9aa5d8ba84
network: include glibc headers before including kernel headers
2019-05-09 03:21:31 +02:00
Yu Watanabe
004aadcacd
network: replace inet_pton() with in_addr_from_string()
2019-05-09 01:44:31 +02:00
Susant Sahani
1087623bac
networkd: Add support to configure proxy ARP and proxy ARP Wifi
2019-05-09 01:44:26 +02:00
Zbigniew Jędrzejewski-Szmek
717e8eda77
Merge pull request #12475 from yuwata/network-fix-12452
...
network: add network_ref/_unref() and make Link object take a reference of Network object
2019-05-07 20:03:22 +02:00
Susant Sahani
715cedfbf0
networkd: Allow DHCP4 client to set the number to attempt to reconfigure.
...
Otherwise current value is 6 and after 6 it will give up.
2019-05-07 17:12:04 +02:00
Yu Watanabe
715d398e61
network: drop list fields in Network object
2019-05-07 16:55:19 +02:00
Yu Watanabe
c9c908a60d
network: make Link objects take references of Network objects
2019-05-07 16:55:19 +02:00
Yu Watanabe
35ac3b7664
network: introduce reference counter for Network object
2019-05-07 16:55:19 +02:00
Yu Watanabe
810ae0dc95
network: warn about Network.IPv4LL= is deprecated
2019-05-04 16:46:02 +02:00
Yu Watanabe
29e81083bd
network: disable fallback IPv4ll address assignment when DHCPv4 is disabled
2019-05-04 16:46:02 +02:00
Ben Boeckel
5238e95759
codespell: fix spelling errors
2019-04-29 16:47:18 +02:00
Yu Watanabe
84ea567eb4
udev,network: warn when .link or .network file has no [Match] section
...
Closes #12098 .
2019-04-25 08:41:10 +02:00
Susant Sahani
81962db798
network: Introduce MACsec
...
Media Access Control Security (MACsec) is an 802.1AE IEEE
industry-standard security technology that provides secure
communication for all traffic on Ethernet links.
MACsec provides point-to-point security on Ethernet links between
directly connected nodes and is capable of identifying and preventing
most security threats, including denial of service, intrusion,
man-in-the-middle, masquerading, passive wiretapping, and playback attacks.
Closes #5754
2019-04-12 10:12:41 +09:00
Yu Watanabe
01234e1fe7
tree-wide: drop several missing_*.h and import relevant headers from kernel-5.0
2019-04-11 19:00:37 +02:00
Yu Watanabe
9282f75bf4
network: make erspan netdev can be specified in Network.Tunnel=
2019-03-30 03:52:25 +09:00
Yu Watanabe
c4f58deab5
network,udev: split static condition tests from net_match_config()
2019-03-21 23:37:39 +09:00