MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / _cleanup_ap_interface

Method _cleanup_ap_interface

wifi_manager.py:2838–2852  ·  view source on GitHub ↗

Cleanup AP interface configuration

(self)

Source from the content-addressed store, hash-verified

2836dhcp-authoritative
2837# Bind to specific interface only
2838bind-interfaces
2839# Log DHCP activity
2840log-dhcp
2841# Gateway option
2842dhcp-option=3,{self.ap_ip}
2843# DNS option (use public DNS)
2844dhcp-option=6,8.8.8.8,8.8.4.4
2845# Disable DNS server to avoid conflicts
2846port=0
2847"""
2848
2849 with open('/tmp/ragnar/dnsmasq.conf', 'w') as f:
2850 f.write(config_content)
2851
2852 if not captive:
2853 config_type = "accessory AP (no gateway/DNS — clients keep their own internet)"
2854 else:
2855 config_type = "with captive portal DNS" if dns_enabled else "DHCP-only (no DNS conflicts)"

Callers 2

stop_ap_modeMethod · 0.95
_cleanup_ap_modeMethod · 0.95

Calls 3

infoMethod · 0.80
errorMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected