summaryrefslogtreecommitdiffstats
path: root/src/network (follow)
Commit message (Collapse)AuthorAgeFilesLines
* networkd: correct batman-adv setting name (GatewayBandwidth) (#19539)Jörg Deckert2021-05-081-0/+2
| | | Co-authored-by: Jörg Deckert <jdeckert@unitas-network.de>
* rfc3046 implementationYegor Alexeyev2021-05-085-4/+53
|
* network: do not bring up CAN interface on configureYu Watanabe2021-04-301-0/+4
|
* network: make CAN device follow activation policyYu Watanabe2021-04-301-10/+9
|
* network: introduce link_activate()Yu Watanabe2021-04-302-7/+17
|
* network: do not try to configure address or etc on can deviceYu Watanabe2021-04-303-0/+25
|
* network: can: shorten code a bitYu Watanabe2021-04-301-13/+5
|
* network: can: do not warn if link does not exist anymoreYu Watanabe2021-04-301-1/+5
|
* network: drop duplicated link_up_can()Yu Watanabe2021-04-303-45/+4
|
* network: neighbor: use sd_netlink_message_read_data() at one more placeYu Watanabe2021-04-291-30/+7
|
* network: introduce log_neighbor_debug()Yu Watanabe2021-04-291-34/+35
|
* network: reduce indentation in log_address_debug() or friendsYu Watanabe2021-04-294-70/+74
|
* network: do not set nexthop ID, gateway, and multipath routes simultaneouslyYu Watanabe2021-04-291-8/+20
| | | | | | | | | | | | | | | See kernel's rtm_to_fib_config() in net/ipv4/fib_frontend.c and rtm_to_fib6_config() in net/ipv6/route.c. Note that if both gateway and multipath routes are specified, then kernel ignores gateway. So, strictly speaking, setting both gateway and multipath routes is allowed by kernel. But such situation is mostly user's misconfiguration. Let's refuse it. Note that the conditions newly added in route_configure() are redundant, as all static configurations are already verified in route_section_verify(), and dynamic configurations do not set nexthop_id or multipath routes. Just for safety.
* network: do not remove reject type routes more than onceYu Watanabe2021-04-292-0/+6
| | | | | | | | | | | Usually, removing non-existing addresses, routes, and etc, are safe. However, when multiple interfaces lost their carriers simultaneously, then manager_drop_routes() and manager_drop_nexthop() are called multiple times. If a route with a blackhole nexthop is removed in that process, the later removal requests of the route fail with -EINVAL, rathar than -ESRCH, as the corresponding nexthop does not exist anymore. So, let's not remove routes which managed by Manager more than once.
* network: do not set route type on specific route removalYu Watanabe2021-04-291-4/+20
|
* network: unify log_link_message_full_errno() and log_message_warning_errno()Yu Watanabe2021-04-294-25/+29
| | | | This also introduces log_message_error_errno() or friends.
* network: dhcp4: downgrade log level when interface is removedYu Watanabe2021-04-291-1/+3
|
* network: drop meaningless bitfield specifiersYu Watanabe2021-04-291-2/+2
|
* Merge pull request #19449 from yuwata/network-downgrade-log-levelYu Watanabe2021-04-294-7/+6
|\ | | | | network: downgrade log level and fix typo
| * network: ndisc: fix ipv6 route preference for routes with Gateway=_ipv6raYu Watanabe2021-04-291-1/+1
| |
| * network: neighbor: downgrade log levelYu Watanabe2021-04-281-4/+3
| | | | | | | | | | As commented in the code, kernel sends messages about neighbors after a link is removed.
| * network: link: downgrade log levelYu Watanabe2021-04-281-1/+1
| | | | | | | | The error is harmless, and will be ignored. Let's downgrade log level.
| * network: dhcp4: downgrade log levelYu Watanabe2021-04-281-1/+1
| | | | | | | | It is not necessary to log such information on higher level.
* | Merge pull request #19374 from yuwata/network-dhcp-routes-to-ntpLennart Poettering2021-04-284-17/+64
|\ \ | |/ |/| network: dhcp4: introduce RoutesToNTP= boolean setting
| * network: dhcp4: introduce RoutesToNTP= boolean settingYu Watanabe2021-04-264-0/+29
| |
| * network: dhcp4: split and rename link_set_dns_routes()Yu Watanabe2021-04-261-17/+34
| |
| * network: dhcp4: enable RoutesToDNS= by defaultYu Watanabe2021-04-261-0/+1
| |
* | Add support for conditions on the machines firmwareUwe Kleine-König2021-04-282-0/+2
| | | | | | | | | | | | This allows to limit units to machines that run on a certain firmware type. For device tree defined machines checking against the machine's compatible is also possible.
* | network: neighbor: Always add neighbors with replaceWilliam A. Kennington III2021-04-271-4/+0
|/ | | | | | | | | | We were duplicating setting flags for the message and a combination of NLM_F_APPEND and NLM_F_CREATE which does not make sense. We should have been using NLM_F_REPLACE and NLM_F_CREATE since the kernel can dynamically create neighbors prior to us adding an entry. Otherwise, we can end up with cases where the message will time out after ~25s even though the neighbor still gets added. This delays the rest of the setup of the interface even though the error is ultimately ignored.
* Merge pull request #19286 from yuwata/network-dhcp-routes-to-dns-19077Zbigniew Jędrzejewski-Szmek2021-04-261-39/+115
|\ | | | | network: dhcp4: set gateway for route to dns server if it is not in the same network
| * network: dhcp4: ignore null dns addressYu Watanabe2021-04-231-0/+3
| |
| * network: dhcp4: set gateway for route to DNS server if it is not in the same ↵Yu Watanabe2021-04-231-14/+22
| | | | | | | | | | | | network Fixes #19077.
| * network: dhcp4: ignore gateway in static routes if destination is link-local ↵Yu Watanabe2021-04-231-26/+89
| | | | | | | | | | | | | | or in the same network This also configures routes to gateways in static routes if the destination is not in the same network.
| * network: dhcp4: also set route MTU to prefix route and DNS routesYu Watanabe2021-04-231-0/+2
| |
* | network: update comment and log messageYu Watanabe2021-04-261-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | After 4b30f2e135ee84041bb597edca7225858f4ef4fb, reading stable_secret sysctl property fails with -ENOMEM, instead of -EIO. This is due to read_full_virtual_file() uses read() as the backend while read_one_line_file() uses fgetc(). And each functions return different error on fails. Anyway, the failure is harmless here. So, the log message and comment is updated. Closes one of the issues in #19410.
* | Merge pull request #19421 from yuwata/fix-typoLuca Boccassi2021-04-261-1/+1
|\ \ | | | | | | core, network: Fix typo
| * | network: fix typoYu Watanabe2021-04-261-1/+1
| |/ | | | | | | Follow-up for 4b409e855b18c263b0526c826fdca16215a4cf2e.
* / network: add missing sectionsYu Watanabe2021-04-261-0/+2
|/ | | | | | Follow-up for 4e26a5baa0045c8bbb899f0c72f07ac630692bd3. Fixes one of issues in #19410.
* Merge pull request #19392 from yuwata/network-dhcp-split-link_set_dhcp_routesYu Watanabe2021-04-231-197/+256
|\ | | | | network: split link_set_dhcp_routes() into smaller functions
| * network: dhcp4: simplify link_set_dns_routes()Yu Watanabe2021-04-221-53/+52
| |
| * network: dhcp4: introduce link_set_dhcp_gateway() and ↵Yu Watanabe2021-04-221-76/+112
| | | | | | | | link_set_dhcp_route_to_gateway()
| * network: dhcp4: introduce link_set_dhcp_static_routes()Yu Watanabe2021-04-221-63/+89
| |
| * network: dhcp4: introduce link_set_dhcp_prefix_route()Yu Watanabe2021-04-221-30/+28
| |
* | Merge pull request #19346 from mihajlov/dhcp_broadcast_l3Dimitri John Ledkov2021-04-224-4/+29
|\ \ | | | | | | network: enable DHCP broadcast flag if required by interface
| * | network: enable DHCP broadcast flag if required by interfaceViktor Mihajlovski2021-04-214-4/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some interfaces require that the DHCPOFFER message is sent via broadcast if they can't receive unicast messages before they've been configured with an IP address. E.g., s390 ccwgroup network interfaces operating in layer3 mode face this limitation. This can prevent the interfaces from receiving an IP address via DHCP, if the have been configured for layer3. To allow DHCP over such interfaces, we're introducing a new device property ID_NET_DHCP_BROADCAST which can be set for those. The networkd DHCP client will check whether this property is set for an interface, and if so will set the broadcast flag, unless the network configuration for the interface has an explicit RequestBroadcast setting. Besides that, we're adding a udev rule to set this device property for ccwgroup devices operating in layer3 mode, which is the case if the ID_NET_DRIVER property is qeth_l3. Supercedes #18829
* | | fix: point to the correct drop-ins subdirectory for confsJóhann B. Guðmundsson2021-04-221-1/+1
| |/ |/|
* | Merge pull request #19271 from yuwata/dhcp-duid-uuidLennart Poettering2021-04-2118-325/+509
|\ \ | | | | | | network: fix issues arround DHCP DUID-UUID
| * | network: dhcp: constify link_get_duid()Yu Watanabe2021-04-214-16/+19
| | |
| * | network: dhcp: introduce duid_needs_product_uuid() helper functionYu Watanabe2021-04-211-1/+7
| | |
| * | network: configure non-dhcp configs earlier even DUID-UUID is used by DHCP ↵Yu Watanabe2021-04-2112-126/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clients Previously, if DUID-UUID is used, all configurations are configured after networkd gets product uuid of machine. This makes only DHCP clients are delayed, and other configs are configured earlier.