Do not leak wireless options into non-wireless device configurations on concurrent...
authorMichael Prokop <mika@grml.org>
Sat, 18 Jul 2020 14:29:05 +0000 (16:29 +0200)
committerMichael Prokop <mika@grml.org>
Sat, 18 Jul 2020 14:33:41 +0000 (16:33 +0200)
When configuring a wlan device *and* afterwards a non-wlan device
within the same netcardconfig invocation, the wireless configuration
is still around (via $IWOURLINE and its underlying writeiwline()).

This causes the wireless options to be present even if not applicable,
like for example (wlan0 was configured first, then eth0 afterwards):

| allow-hotplug eth0
| iface wlan0 inet dhcp
|   wireless-mode Managed
|   wireless-essid SECRET
|   wpa-ssid SECRET
|   wpa-psk SECRET
|
|
| iface eth0 inet static
|         address 10.42.42.1
|         netmask 255.255.255.0
|         network 10.42.42.0
|         broadcast 10.42.42.255
|         gateway 10.42.42.1
|         dns-nameservers 10.42.42.1
| wireless-mode Managed
| wireless-essid SECRET
| wpa-ssid SECRET
| wpa-psk SECRET

This work was funded by Grml-Forensic.


No differences found