Commit af2d158f authored by Lucas Serrano's avatar Lucas Serrano
Browse files

[gen_confs] Désactivation mdns switchs

Pour empêcher les ordinateurs Apple de faire n'importe quoi…
parent e68fe10d
......@@ -101,3 +101,8 @@ interface {{ port|int }}
no lacp
exit
{%- endfor %}
;--- Filtre de protocole ---
{%- if drop_mdns %}
filter multicast 01005e0000fb drop all
filter multicast 3333000000fb drop all
{%- endif %}
......@@ -336,6 +336,12 @@ def conf_switch(hostname):
data['trusted'] = str(PortList(p for p in ports_list if p.is_trusted()))
data['non_trusted'] = str(PortList(p for p in ports_list if not p.is_trusted()))
# On désactive le multicast mdns
if "2910" in switch['info'][0].value:
data['drop_mdns'] = True
else:
data['drop_mdns'] = False
# On render :
return tpl_env.get_template('switch_conf.tpl').render(**data).encode('utf-8')
......
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