summaryrefslogtreecommitdiffstats
path: root/src/libsystemd-network/sd-radv.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* libsystemd-network: make log_dhcp_client() or friends include interface nameYu Watanabe2021-03-031-30/+28
|
* libsystemd-network: introduce sd_xxx_{set,get}_ifname()Yu Watanabe2021-03-031-0/+19
|
* tree-wide: constify variables if possibleYu Watanabe2021-02-171-10/+10
|
* network: use in_addr_prefix_to_string()Yu Watanabe2021-02-171-34/+32
|
* tree-wide: use in_addr_is_set() or friendsYu Watanabe2021-02-171-5/+3
|
* sd-radv: refuse to set preference except medium when router lifetime is zeroYu Watanabe2020-11-091-3/+6
|
* sd-radv: router lifetime is uint16_tYu Watanabe2020-11-091-3/+3
|
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-091-1/+1
|
* libsystemd-network: do not request each daemon exist in sd_xxx_stop()Yu Watanabe2020-10-151-1/+2
|
* sd-radv: fix indentationLennart Poettering2020-09-231-10/+10
| | | | Fix-up for 97efde65d81b1501a3737f408f1234c6c25da61c
* various: remove assignments of unread variablesZbigniew Jędrzejewski-Szmek2020-09-221-1/+0
|
* network: radv: Send RA on newly-added dynamic prefixMichael Marley2020-07-261-0/+18
| | | | | | | | | | | | | | When a prefix is delegated to an interface that is already sending RAs, send an RA immediately to inform clients of the new prefix. This allows them to start using it immediately instead of waiting up to nearly 10 minutes (depending on when the last timed RA was sent). This type of situation might occur if, for example, an outage of the WAN connection caused the addresses and prefixes to be lost and later regained after service was restored. The condition for the number of RAs sent being above 0 simultaneously ensures that RADV is already running and that this code doesn't send any RAs before the timed RAs have started when the interface first comes up.
* radv: introduce sd_radv_is_running()Yu Watanabe2020-07-201-0/+6
|
* Revert "network: Don't send RA with zero router lifetime when restarting radv"Yu Watanabe2020-07-071-11/+7
| | | | This reverts commit d469cea3bde53bc39317c8b433c825bb4790cbe5.
* network: Don't send RA with zero router lifetime when restarting radvMichael Marley2020-07-071-7/+11
| | | | | | | | | | | | | | While investigating https://github.com/systemd/systemd/issues/16356, I discovered that networkd stops the radv service before adding or updating prefixes and then starts it again. This causes networkd to send an RA with a router lifetime of zero, causing the routes to flap on systems receiving the RA for a fraction of a second before radv is started again and proper RAs are sent. That has the potential to cause issues with latency-sensitive traffic like gaming or VoIP. This patch adds a boolean argument to the sd_radv_stop() function to control this behavior. The zero lifetime RA is still sent whenever radv is actually being stopped, but when it is being restarted for a prefix update (from networkd-dhcp6.c), the final RA is no longer sent to avoid the route flapping.
* dhcp6, radv: only accept valid ifindexYu Watanabe2020-07-021-1/+1
|
* network: 'cur' variable cannot be null, so simplify codeBenjamin Robin2020-05-131-4/+2
|
* network: radv introduce sd_radv_prefix_get_prefixSusant Sahani2020-02-291-0/+12
|
* sd-radv: fix memleakYu Watanabe2019-11-051-0/+7
|
* sd-radv: if lifetime < SD_RADV_DEFAULT_MAX_TIMEOUT_USEC, adjust timeout (#13491)Georg Müller2019-09-201-0/+11
| | | | | | | | | | | The RFC states that lifetime (AdvDefaultLifetime) must be at least MaxRtrAdvInterval (which more or less corresponds to SD_RADV_DEFAULT_MAX_TIMEOUT_USEC in systemd). To fulfill this limit, virtually lower MaxRtrAdvInterval and MinRtrAdvInterval accordingly. Also check that min is not lower than 3s and max is not lower than 4s.
* network: Add support to advertie ipv6 routeSusant Sahani2019-09-171-2/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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:: ```
* sd-radv: fix memleakYu Watanabe2019-05-071-0/+1
| | | | Fixes one memleak found in #12452.
* util: split out memcmp()/memset() related calls into memory-util.[ch]Lennart Poettering2019-03-131-1/+1
| | | | Just some source rearranging.
* networkd: refuse IPv6 RADV prefixes that lack Prefix= settingLennart Poettering2018-11-301-0/+4
| | | | Fixes: #9589
* tree-wide: use IOVEC_MAKE() at many placesLennart Poettering2018-11-271-24/+11
|
* sd-radv: use struct initializersLennart Poettering2018-11-261-15/+13
|
* sd-radv: per our CODING_STYLE don't use 'bool' in public headersLennart Poettering2018-11-261-1/+1
|
* sd-radv: no need to initialize r to zeroLennart Poettering2018-11-261-1/+1
|
* sd-radv: make sure we can deal with in_addr_to_string() failingLennart Poettering2018-11-261-2/+2
|
* sd-radv: when receiving a too short packet, make sure we dequeue itLennart Poettering2018-11-261-3/+7
|
* sd-radv: propagate OOM, it's reason to failLennart Poettering2018-11-261-1/+1
|
* sd-radv: follow our usualy rule that destructors can take NULLLennart Poettering2018-11-261-1/+2
|
* sd-radv: simplify IPv6 address is-null checkLennart Poettering2018-11-261-1/+3
|
* sd-radv: drop const from non-ptr argumentLennart Poettering2018-11-261-2/+1
|
* sd-radv: use ether_addr_is_null() where appropriateLennart Poettering2018-11-261-2/+2
|
* sd-radv: do not unref() event sources when update or disable themYu Watanabe2018-11-161-31/+17
|
* sd-radv: use structured initializer at one more placeYu Watanabe2018-11-161-5/+5
|
* sd-radv: EAGAIN is not really unexpected, distinguishit from other errors ↵Lennart Poettering2018-10-021-1/+4
| | | | when logging
* sd-radv: remove log_radv_warning_errno()Lennart Poettering2018-10-021-4/+4
| | | | | | According to our CODING_STYLE our library code should generally not log beyond LOG_DEBUG. Let's hence get rid of log_radv_warning_errno() and just use log_radv_errno() instead.
* tree-wide: use DEFINE_TRIVIAL_REF_UNREF_FUNC() macro or friends where applicableYu Watanabe2018-08-271-41/+5
|
* Correct a number of trivial typos.Chris Lamb2018-06-181-1/+1
|
* tree-wide: use proper unicode © instead of (C) where we canLennart Poettering2018-06-141-1/+1
| | | | | | Let's use a proper unicode copyright symbol where we can, it's prettier. This important patch is very important.
* tree-wide: drop 'This file is part of systemd' blurbLennart Poettering2018-06-141-2/+0
| | | | | | | | | | | | | | | | This part of the copyright blurb stems from the GPL use recommendations: https://www.gnu.org/licenses/gpl-howto.en.html The concept appears to originate in times where version control was per file, instead of per tree, and was a way to glue the files together. Ultimately, we nowadays don't live in that world anymore, and this information is entirely useless anyway, as people are very welcome to copy these files into any projects they like, and they shouldn't have to change bits that are part of our copyright header for that. hence, let's just get rid of this old cruft, and shorten our codebase a bit.
* sd-radv: use strv_isempty() where we canLennart Poettering2018-06-131-2/+1
|
* sd-radv: normalize function parameters a bitLennart Poettering2018-06-131-3/+3
| | | | | | | | Let's add "const" where we don't change structures passed. Also, we generally use "unsigned char" for IP prefix length values, do so here too. Previously different parts of the sd-radv.h API used different types for this.
* sd-radv: close fd when destroying objectLennart Poettering2018-06-131-0/+4
|
* networkd: Don't try to close fd in sd_radv_stop if fd is closed.Susant Sahani2018-06-131-0/+3
| | | | | | | | | | | | | sd_radv_stop is called from two places. if sd_radv_stop is alrady success then just don't try to close it . ``` systemd-networkd[604]: RADV: Stopping IPv6 Router Advertisement daemon systemd-networkd[604]: RADV: Unable to send last Router Advertisement with router lifetime set to zero: Bad file descriptor <==================HERE systemd-networkd[604]: RADV: Updated prefix 2a0a:*:*:fc::/64 preferred 1h valid 2h systemd-networkd[604]: RADV: Started IPv6 Router Advertisement daemon ``` Closes one of the issue #8960
* tree-wide: drop license boilerplateZbigniew Jędrzejewski-Szmek2018-04-061-13/+0
| | | | | | | | | | Files which are installed as-is (any .service and other unit files, .conf files, .policy files, etc), are left as is. My assumption is that SPDX identifiers are not yet that well known, so it's better to retain the extended header to avoid any doubt. I also kept any copyright lines. We can probably remove them, but it'd nice to obtain explicit acks from all involved authors before doing that.
* tree-wide: use TAKE_PTR() and TAKE_FD() macrosYu Watanabe2018-04-051-10/+4
|
* Merge pull request #7582 from pfl/dhcp6_prefix_delegationLennart Poettering2018-01-151-9/+88
|\ | | | | DHCPv6 prefix delegation