Skip to content

Commit

Permalink
dhcp6: omit noprefixroute with address-length (bsc#1150972)
Browse files Browse the repository at this point in the history
Permit to assume that the address prefix-length override
specified in the config is a valid on-link prefix length,
to let the kernel create a route for this prefix.
  • Loading branch information
mtomaschewski committed Sep 19, 2019
1 parent def696a commit a840a53
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/dhcp6/protocol.c
Expand Up @@ -2710,7 +2710,11 @@ ni_dhcp6_ia_copy_to_lease_addrs(const ni_dhcp6_device_t *dev, ni_addrconf_lease_
ap->cache_info.acquired = ia->acquired;
ap->cache_info.preferred_lft = iadr->preferred_lft;
ap->cache_info.valid_lft = iadr->valid_lft;
ni_address_set_noprefixroute(ap, TRUE);
/* do not set noprefixroute on a non-/128 config override
* to apply the override as usable on-link prefix length */
if (!dev->config->address_len &&
plen != ni_af_address_prefixlen(AF_INET6))
ni_address_set_noprefixroute(ap, TRUE);

ni_debug_verbose(NI_LOG_DEBUG1, NI_TRACE_DHCP,
"%s: added %sDHCPv6 address %s/%u to lease",
Expand Down

0 comments on commit a840a53

Please sign in to comment.