[gen_confs] Désactivation mdns switchs
Pour empêcher les ordinateurs Apple de faire n'importe quoi…
This commit is contained in:
parent
e68fe10d56
commit
af2d158ff1
2 changed files with 11 additions and 0 deletions
|
@ -101,3 +101,8 @@ interface {{ port|int }}
|
||||||
no lacp
|
no lacp
|
||||||
exit
|
exit
|
||||||
{%- endfor %}
|
{%- 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['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()))
|
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 :
|
# On render :
|
||||||
return tpl_env.get_template('switch_conf.tpl').render(**data).encode('utf-8')
|
return tpl_env.get_template('switch_conf.tpl').render(**data).encode('utf-8')
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue