Commit Graph

92 Commits

Author SHA1 Message Date
oblique
ddd6bfad45 Merge pull request #48 from blucell/patch-1 2014-09-18 05:50:46 +00:00
Ahmed Mokhtar
04c5695c8e Update create_ap 2014-09-18 01:54:27 +03:00
Ahmed Mokhtar
f589df0565 Using virtual interface names "ap*" 2014-09-17 16:52:37 +03:00
Ahmed Mokhtar
4516520cf2 Fix virtual drive auto-renaming
In some Linux distributions (e.g. Ubuntu, Debian), udev automatically renames any device with its name prefix is "eth*", "wlan*",... as declared in "/lib/udev/rules.d/75-persistent-net-generator.rules". This made a problem when creating a virtual device on these distributions declaring that device not found. Solution was to change virtual device's name prefix to "ap*" to avoid this collision.
2014-09-17 04:15:34 +03:00
oblique
488f84e14f rename virt. interface if it was renamed by udev at creation
fix #16
2014-09-10 23:12:33 +03:00
oblique
034545483c fix bug: networkmanager_rm_unmanaged_if_needed was ignoring 2nd argument 2014-09-10 23:03:04 +03:00
oblique
6c56e81148 Specify listen-address in dnsmasq instead of listen-interface
Ubuntu has a bit different setup than other distributions and because
of this dnsmasq was failing to retrieve the results of a DNS lookup.
This can be fixed if we specify that the listen-address is the gateway
instead of binding all the addresses of the WIFI_IFACE.

Fix #46
2014-09-09 23:19:16 +03:00
oblique
5ff7503e01 check the length of passphrase and SSID at the beginning 2014-09-07 03:30:41 +03:00
oblique
f66819c145 Check if the user passed a valid interface 2014-09-06 21:49:52 +03:00
oblique
3fe8513d9a Handle the case where `unmanaged-devices=' is empty
Fix #45
2014-09-06 20:33:33 +03:00
oblique
93d479c1eb Fix some messages 2014-09-06 19:26:10 +03:00
oblique
81d861cb46 Reimplementation of 6a3e1d98 commit
With the 6a3e1d98 commit NetworkManager was throwing an assertion so
we take a different approach when we create the bridge interface.
Also if the <interface-with-internet> is already a bridge interface
we skip creation.

The new approach is:

   1) Save the IPs and route table of INTERNET_IFACE
   2) If NetworkManager is running set INTERNET_IFACE as unmanaged
   3) Create BRIDGE_IFACE and add INTERNET_IFACE to it
   4) Set the previously saved IPs and route table to BRIDGE_IFACE

Better fix #19
2014-09-05 02:13:59 +03:00
oblique
14ec50f379 Update Gentoo instructions 2014-09-04 11:03:22 +03:00
oblique
6a3e1d98ab Initialize correctly the bridge interface
To initialize the bridge interface correctly we need to do the following:

   1) duplicate the IPs of INTERNET_IFACE to BRIDGE_IFACE
   2) duplicate routing table of INTERNET_IFACE to BRIDGE_IFACE
   3) delete routing table of INTERNET_IFACE

   NOTE: we don't need to delete the IPs of INTERNET_IFACE

We need the above because BRIDGE_IFACE is the master interface from now on
and it must know where is connected, otherwise connection is lost.

Fix #19
2014-09-04 01:56:09 +03:00
oblique
0ba638f780 Detect if the adapter can be an AP and AP+STA
Fix #9
2014-09-02 23:05:46 +03:00
oblique
718ea69e46 Do not call networkmanager_add_unmanaged if NetworkManager is not running 2014-08-31 18:06:17 +03:00
oblique
25add14aa0 Refactor networkmanager_{add/rm}_unmanaged 2014-08-31 17:40:17 +03:00
oblique
367dd2f939 Use 'interface-name:' to set an interface as unmanaged in NetworkManager.
Form NetworkManager 0.9.10 and above they introduce 'interface-name:'
for 'unmanaged-devices', use this method instead of 'mac:' since it
reduce many problems.

Fix #33
2014-08-31 14:04:19 +03:00
oblique
142c1b76c8 Remove a trailing whitespace 2014-08-31 12:49:45 +03:00
oblique
c6eea21020 Change MAC address only if needed
Some virtual interfaces have a different MAC address from their real
interfaces and their drivers disallow us to change it. In this case
we don't need to change the MAC address anyway.

With this we can avoid errors like 'RTNETLINK answers: Invalid argument'.
2014-08-28 21:34:19 +03:00
oblique
c04f7f0bd8 Redirect iptables output to /dev/null on cleanup 2014-08-28 20:50:09 +03:00
oblique
503e715d4e update README.md 2014-08-28 20:46:52 +03:00
oblique
309b56f5fc Some drivers still use the old WiFi subsystem, use iwconfig/iwlist in these cases
Fixes #43
2014-08-28 20:20:25 +03:00
oblique
6252e6fd88 minor change 2014-08-28 09:01:00 +03:00
oblique
fd75f56635 Do not allow user to use `phyX' of the interface 2014-08-28 08:40:15 +03:00
oblique
3f49258758 Check at the beginning if WIFI_IFACE is a WiFi interface or not 2014-08-28 01:24:10 +03:00
oblique
64790ff5f2 Check in `iw phy phyX info' if we can transmit to the selected channel 2014-08-28 01:24:10 +03:00
oblique
258fbc1f94 increase the sleep of networkmanager_rm/add_unmanaged 2014-08-19 00:06:34 +03:00
oblique
701becace9 fix a typo 2014-08-17 04:43:35 +03:00
oblique
92b696efcf handle service's stop correctly 2014-08-17 04:22:23 +03:00
oblique
d388c593ab disable SIGINT in cleanup(), so the user will not be able to interrupt it 2014-08-17 02:16:12 +03:00
oblique
4758bcf6d9 Merge branch 'hashken-hostapd_bug' 2014-08-17 01:16:50 +03:00
Karthik
d9284c3d6b Check version of NetworkManager
* Check the version of Network Manager and accordingly issue commands
as nmcli >= 0.9.10 is not backwards compatible
* Also, check if NetworkManager is running before issuing related
suggestions
2014-08-17 01:14:24 +03:00
Karthik
0e9a81ff94 Give remedial suggestion for hostapd bug
Hostapd v2 introduces a bug which currently throws the following error
and initialization fails
    nl80211: Could not configure driver mode
    nl80211 driver initialization failed.
    hostapd_free_hapd_data: Interface wlp3s0ap wasn't started

More Info: https://bugs.launchpad.net/ubuntu/+source/wpa/+bug/1289047

Give a suggestive message to the user when hostapd fails because of the
above bug outlining the workaround mentioned in the above bug report.
2014-08-17 01:13:42 +03:00
oblique
9ab97af451 networkmanager_is_running: we don't need to redirect stderr in /dev/null 2014-08-17 01:10:50 +03:00
oblique
89a457d597 Add `version_cmp' function 2014-08-16 23:13:32 +03:00
oblique
38063a6160 systemd service: start create_ap after network.target 2014-08-16 18:31:29 +03:00
oblique
609949d26a make dnsmasq able to run even if another instance exist 2014-08-15 11:41:30 +03:00
oblique
e37caff43d README.md: Update installation section
Fixes #27
2014-08-04 15:17:43 +03:00
oblique
2491ef2a3a Better parse of nmcli output 2014-08-04 14:03:15 +03:00
oblique
6acf353c9d networkmanager_is_running: Use 'nmcli g' first and if it fails fallback to 'nmcli nm' 2014-08-03 14:45:27 +03:00
oblique
ed7d3f36f9 Use 'nmcli' to determine if NetworkManager switched adapter to unmanaged
Fix #29
2014-07-28 19:24:02 +03:00
oblique
709652041f Add CCMP in wpa_pairwise of hostapd.conf 2014-06-07 16:53:28 +03:00
oblique
cfc9630338 Merge pull request #22 from eduardohenriquearnold/master
Update service file to fix cleaning process when service is requested to stop
2014-06-04 09:49:48 +03:00
Eduardo Henrique Arnold
993bdb9ce6 Update service file to fix cleaning process
Inserted the ExecStop directive to kill the hostapd process in order for the script to be able to receive the SIGINT signal. This enables the cleaning process to work when requesting the service to stop.
2014-06-03 13:45:19 +01:00
oblique
104c55606f We don't need to set an IP to the bridged interface
Fix #18
2014-04-05 22:08:33 +03:00
oblique
ef1a466a13 Merge pull request #17 from oaix/master
add IEEE 802.11n support
2014-04-05 12:47:06 +03:00
Shaw
1cd94e81d0 add IEEE 802.11n support 2014-04-03 20:57:26 +08:00
oblique
d556cd1fd2 Merge pull request #12 from mika/master
Redirect error messages to stderr
2014-02-21 10:11:12 +02:00
Michael Prokop
b77ccb0ecc Redirect error messages to stderr 2014-02-21 08:35:41 +01:00