Commit 055bdf14 authored by Kirill Smelkov's avatar Kirill Smelkov

software/ors-amarisoft: Do not give RU more than /64

Dnsmasq insists on dhcp-range's prefixlen to be at most 64, which
triggers the following error if original slaptap is wider than that:

    dnsmasq: prefix length must be at least 64 at line 5 of /srv/slapgrid/slappart6/etc/dnsmasq.cfg

-> Fix it by capping provided range to /64

/cc @tomo, @xavier_thompson, @Daetalus
/reported-by @lu.xu
/reviewed-by @jhuge
/reviewed-on nexedi/slapos!1509
parent 1494d6d5
Pipeline #32271 failed with stage
in 0 seconds
......@@ -136,7 +136,7 @@ md5sum = f167b4be5e327b276b42267e0678f577
[ru_dnsmasq.jinja2.cfg]
_update_hash_filename_ = ru/dnsmasq.jinja2.cfg
md5sum = 345e4967d468b00c13d77821bce8a248
md5sum = 9bd5b08f23640f71ad109d186d060f2d
[ims.jinja2.cfg]
filename = config/ims.jinja2.cfg
......
......@@ -7,7 +7,8 @@ port=5354
{%- set plen = netaddr.IPNetwork(vtap.network).prefixlen %}
# {{ cell_ref }} @ {{ ru_tap }}
dhcp-range=tag:{{ ru_tap }},{{ vtap.gateway }},{{ vtap.gateway }},static,{{ plen }},5m
{#- TODO consider using /128 as we give only 1 address to RU #}
dhcp-range=tag:{{ ru_tap }},{{ vtap.gateway }},{{ vtap.gateway }},static,{{ max(plen,64) }},5m
dhcp-host={{ cell.ru_mac_addr }},tag:{{ ru_tap }},[{{ vtap.gateway }}]
# option 17 used for RU callhome
# dhcp-option=option6:17,[{{ vtap.addr }}]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment