Univention Bugzilla – Bug 37614
DHCP default routing policy linked to ldap base at rejoin
Last modified: 2015-08-20 11:31:40 CEST
The default dhcp routing policy is linked to the ldap base at rejoin. This is possibly unwished and destroys functionality (for example if using routing policies for subnets and ip-managed clients underneath the service).
old=$(univention-directory-manager policies/dhcp_routing list "$@" --filter cn=default-settings | sed -ne 's|.*routers: ||p')
if [ -z "$old" -a -n "$gateway" ]; then
univention-directory-manager policies/dhcp_routing modify "$@" --ignore_exists \
--dn "cn=default-settings,cn=routing,cn=dhcp,cn=policies,$ldap_base" \
--set name=default-settings \
--set routers="$gateway" || die
Reported again Ticket#2015070221000354
(In reply to Tim Petersen from comment #0)
> The default dhcp routing policy is linked to the ldap base at rejoin.
> -> 25univention-dhcp.inst:
> univention-directory-manager policies/dhcp_routing modify "$@"
The cited code only modifies the existing policy, but does not reference it.
This was done in the base.ldif, which is only imported once when the DC master is installed.
Nether the less setting the default gateway always happens when a DHCP server is joined AND the router has been deleted. The options for removing the default router are:
- deleted the default policy completely (leads to Bug #38822)
- Remove the referenced from the LDAP base.
r61862 | Bug #38584,Bug #37614,Bug #38822: DHCP policies
The code was changed to set the router in the default policy only once when the first (shared) subnet is created. If multiple subnets exist, the policy is not touched.
r61863 | Bug #38584,Bug #37614,Bug #38822: DHCP policies YAML
Code review: OK