mirror of
https://github.com/yazdanv/Hassio-Access-Point.git
synced 2025-01-29 04:06:28 -05:00
Revert "Config option: specify ethernet interface"
This reverts commit 36536f35a0
.
This commit is contained in:
parent
61a9364f87
commit
fc5b82977f
@ -24,7 +24,6 @@ Please add
|
||||
- **netmask** (**required**): Subnet mask of the network
|
||||
- **broadcast** (**required**): Broadcast address of the network
|
||||
- **interface** (_optional_): Which wlan card to use. Default: wlan0
|
||||
- **eth_interface** (_optional_): Which ethernet interface to use. Default: eth0
|
||||
- **hide_ssid** (_optional_): Whether SSID is visible or hidden. 0 = visible, 1 = hidden. Defaults to visible
|
||||
- **dhcp** (_optional_): Enable or disable DHCP server. 0 = disable, 1 = enable. Defaults to disabled
|
||||
- **dhcp_start_addr** (_optional_): Start address for DHCP range. Required if DHCP enabled
|
||||
|
@ -6,11 +6,6 @@
|
||||
- Error: "wlan0: Could not connect to kernel driver" - https://raspberrypi.stackexchange.com/a/88297
|
||||
- **If anyone has any knowledge relating to the underlying modules, or just wants to assist with testing this addon, please get in touch, submit PRs, etc.**
|
||||
|
||||
## [0.4.5] - 2023-04-23
|
||||
|
||||
### Added
|
||||
- Optional config option to specify ethernet interface. Defaults to eth0.
|
||||
|
||||
## [0.4.4] - 2022-12-20
|
||||
|
||||
### Fixed
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Hass.io Access Point",
|
||||
"version": "0.4.5",
|
||||
"version": "0.4.4",
|
||||
"slug": "hassio-access-point",
|
||||
"description": "Create a WiFi access point to directly connect devices to Home Assistant",
|
||||
"arch": ["armhf", "armv7", "aarch64", "amd64", "i386"],
|
||||
@ -22,7 +22,6 @@
|
||||
"netmask": "255.255.255.0",
|
||||
"broadcast": "192.168.99.255",
|
||||
"interface": "wlan0",
|
||||
"eth_interface": "eth0",
|
||||
"hide_ssid": "0",
|
||||
"dhcp": "0",
|
||||
"dhcp_start_addr": "192.168.99.10",
|
||||
@ -43,7 +42,6 @@
|
||||
"netmask": "str",
|
||||
"broadcast": "str",
|
||||
"interface": "str",
|
||||
"eth_interface": "str",
|
||||
"hide_ssid": "int",
|
||||
"dhcp": "int",
|
||||
"dhcp_start_addr": "str",
|
||||
|
@ -27,7 +27,6 @@ ADDRESS=$(jq --raw-output ".address" $CONFIG_PATH)
|
||||
NETMASK=$(jq --raw-output ".netmask" $CONFIG_PATH)
|
||||
BROADCAST=$(jq --raw-output ".broadcast" $CONFIG_PATH)
|
||||
INTERFACE=$(jq --raw-output ".interface" $CONFIG_PATH)
|
||||
ETH_INTERFACE=$(jq --raw-output ".eth_interface" $CONFIG_PATH)
|
||||
HIDE_SSID=$(jq --raw-output ".hide_ssid" $CONFIG_PATH)
|
||||
DHCP=$(jq --raw-output ".dhcp" $CONFIG_PATH)
|
||||
DHCP_START_ADDR=$(jq --raw-output ".dhcp_start_addr" $CONFIG_PATH)
|
||||
@ -46,11 +45,6 @@ if [ ${#INTERFACE} -eq 0 ]; then
|
||||
INTERFACE="wlan0"
|
||||
fi
|
||||
|
||||
# Set eth_interface as eth0 if not specified in config
|
||||
if [ ${#ETH_INTERFACE} -eq 0 ]; then
|
||||
INTERFACE="eth0"
|
||||
fi
|
||||
|
||||
# Set debug as 0 if not specified in config
|
||||
if [ ${#DEBUG} -eq 0 ]; then
|
||||
DEBUG=0
|
||||
@ -220,7 +214,7 @@ if [ $DHCP -eq 1 ]; then
|
||||
if [ $CLIENT_INTERNET_ACCESS -eq 1 ]; then
|
||||
|
||||
## Route traffic
|
||||
iptables-nft -t nat -A POSTROUTING -o $ETH_INTERFACE -j MASQUERADE
|
||||
iptables-nft -t nat -A POSTROUTING -o eth0 -j MASQUERADE
|
||||
iptables-nft -P FORWARD ACCEPT
|
||||
iptables-nft -F FORWARD
|
||||
fi
|
||||
@ -230,7 +224,7 @@ else
|
||||
## No DHCP == No DNS. Must be set manually on client.
|
||||
## Step 1: Routing
|
||||
if [ $CLIENT_INTERNET_ACCESS -eq 1 ]; then
|
||||
iptables-nft -t nat -A POSTROUTING -o $ETH_INTERFACE -j MASQUERADE
|
||||
iptables-nft -t nat -A POSTROUTING -o eth0 -j MASQUERADE
|
||||
iptables-nft -P FORWARD ACCEPT
|
||||
iptables-nft -F FORWARD
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user