Full cleanup of AP mode
(self)
| 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)" |
| 2856 | self.logger.info(f"Created dnsmasq configuration {config_type}") |
| 2857 | self.ap_logger.info(f"Created dnsmasq configuration at /tmp/ragnar/dnsmasq.conf ({config_type})") |
| 2858 | self.ap_logger.debug(f"Dnsmasq config content:\n{config_content}") |
| 2859 | return True |
| 2860 | |
| 2861 | except Exception as e: |
| 2862 | self.logger.error(f"Error creating dnsmasq config: {e}") |
| 2863 | self.ap_logger.error(f"Error creating dnsmasq config: {e}") |
| 2864 | return False |
| 2865 | |
| 2866 | def _configure_ap_interface(self): |
| 2867 | """Configure network interface for AP mode""" |
| 2868 | try: |
| 2869 | self.ap_logger.info(f"Configuring interface {self.ap_interface} for AP mode") |
| 2870 | |
| 2871 | # Stop NetworkManager from managing the interface |
| 2872 | self.ap_logger.debug("Setting NetworkManager to not manage interface") |
no test coverage detected