@@ -619,7 +619,7 @@ static int ndisc_router_process_default(Link *link, sd_ndisc_router *rt) {
619619 return 0 ;
620620}
621621
622- static bool stableprivate_address_is_valid (const struct in6_addr * addr ) {
622+ static bool stable_private_address_is_valid (const struct in6_addr * addr ) {
623623 assert (addr );
624624
625625 /* According to rfc4291, generated address should not be in the following ranges. */
@@ -636,7 +636,7 @@ static bool stableprivate_address_is_valid(const struct in6_addr *addr) {
636636 return true;
637637}
638638
639- static int make_stableprivate_address (Link * link , const struct in6_addr * prefix , uint8_t prefix_len , uint8_t dad_counter , struct in6_addr * * ret ) {
639+ static int make_stable_private_address (Link * link , const struct in6_addr * prefix , uint8_t prefix_len , uint8_t dad_counter , struct in6_addr * * ret ) {
640640 _cleanup_free_ struct in6_addr * addr = NULL ;
641641 sd_id128_t secret_key ;
642642 struct siphash state ;
@@ -649,7 +649,7 @@ static int make_stableprivate_address(Link *link, const struct in6_addr *prefix,
649649
650650 r = sd_id128_get_machine_app_specific (NDISC_APP_ID , & secret_key );
651651 if (r < 0 )
652- return log_error_errno ( r , "Failed to generate key: %m" );
652+ return log_link_warning_errno ( link , r , "Failed to generate key for IPv6 stable private address : %m" );
653653
654654 siphash24_init (& state , secret_key .bytes );
655655
@@ -672,7 +672,7 @@ static int make_stableprivate_address(Link *link, const struct in6_addr *prefix,
672672 memcpy (addr -> s6_addr , prefix -> s6_addr , l );
673673 memcpy (addr -> s6_addr + l , & rid , 16 - l );
674674
675- if (!stableprivate_address_is_valid (addr )) {
675+ if (!stable_private_address_is_valid (addr )) {
676676 * ret = NULL ;
677677 return 0 ;
678678 }
@@ -704,7 +704,7 @@ static int ndisc_router_generate_addresses(Link *link, struct in6_addr *address,
704704 * only when the address generation algorithm produces an invalid address, and the loop
705705 * may exit with an address which ends up being unusable due to duplication on the link. */
706706 for (; j -> dad_counter < DAD_CONFLICTS_IDGEN_RETRIES_RFC7217 ; j -> dad_counter ++ ) {
707- r = make_stableprivate_address (link , address , prefixlen , j -> dad_counter , & new_address );
707+ r = make_stable_private_address (link , address , prefixlen , j -> dad_counter , & new_address );
708708 if (r < 0 )
709709 return r ;
710710 if (r > 0 )
0 commit comments