Disclosure of Invention
After a black and white list of an AP is modified, a wireless drive of the AP actively refreshes the black and white list and detects whether an associated terminal exists or not and a new terminal sending an association request exists in the black and white list, and meanwhile, the association request is actively sent to the terminal, the association is actively disconnected or the association request of the terminal is actively received according to an access control mode of the AP.
The method for supporting the terminal to set the black and white list without disconnection comprises the following steps:
step 1: setting MAC information of a target terminal in a black and white list of an AP front-end visual interface;
step 2: the AP back end receives the MAC information of the target terminal and then stores the MAC information into an AP database;
and step 3: the AP back end issues the MAC information of the target terminal to the wireless driver in a Wext mode;
and 4, step 4: after receiving the MAC information of the target terminal, the wireless driver stores and accesses an AP control structure, and meanwhile, refreshes a black and white list;
and 5: the wireless drive detects whether the AP starts an access control mode;
step 6: when the wireless driver detects that the AP opens the access control mode, the wireless driver detects whether the current AP has an associated terminal;
and 7: when the wireless driver detects that the current AP has the associated terminal, the wireless driver detects whether the current AP access control mode is an access allowing mode;
and 8: when the wireless driver detects that the current AP access control mode is an access allowing mode, the wireless driver detects whether the current associated terminal belongs to a white list or not;
and step 9: and when the wireless driver detects that the current associated terminal belongs to the white list, the wireless driver keeps continuously associating with the current associated terminal.
The present invention further improves, in step 5, when the wireless driver detects that the AP does not start the access control mode, the wireless driver allows all terminals to access actively.
The present invention further improves, in step 6, when the wireless driver detects that there is no associated terminal in the current AP, the method further includes the following steps:
step 601: the wireless driver detects whether the current AP receives a new terminal association request;
step 602: when the wireless driver detects that the current AP receives a new terminal association request, the wireless driver detects whether the current AP access control mode is an access allowing mode;
step 603: when the wireless driver detects that the current AP access control mode is an access allowing mode, the wireless driver detects whether a current new terminal belongs to a white list or not;
step 604: and when the wireless driver detects that the current new terminal belongs to the white list, the wireless driver receives the association request of the current new terminal.
The present invention further improves, in step 601, when the wireless driver detects that the current AP does not receive a new terminal association request, the wireless driver waits for the new terminal association request.
In step 602, when the wireless driver detects that the current AP access control mode is not the allowed access mode, the wireless driver determines that the current AP is the denied access mode, and detects whether the current new terminal belongs to the blacklist; when detecting that the current new terminal belongs to the blacklist, the wireless drive actively rejects the association request of the current new terminal; and when detecting that the current new terminal does not belong to the blacklist, the wireless driver receives the association request of the current new terminal.
The present invention further improves, in step 603, when the wireless driver detects that the current new terminal does not belong to the white list, the wireless driver actively rejects the association request of the current new terminal.
In step 7, when the wireless driver detects that the current AP access control mode is not the allowed access mode, the wireless driver determines that the AP access control mode is the denied access mode, and detects whether the current associated terminal belongs to the blacklist.
The invention is further improved, when detecting that the current associated terminal belongs to the blacklist list, the wireless drive actively disconnects the current associated terminal; and when detecting that the current associated terminal does not belong to the blacklist list, the wireless driver keeps continuously associating with the current associated terminal.
In step 8, when the wireless driver detects that the current associated terminal does not belong to the white list, the wireless driver actively disconnects the current associated terminal.
The invention also provides a system for realizing the method for setting the black and white list without disconnection of the terminal, which comprises the following steps:
the AP front end is used for setting MAC information of a target terminal in a black and white list;
the AP back end is used for storing the target terminal MAC information into an AP database after receiving the target terminal MAC information and sending the target terminal MAC information to the wireless driver in a Wext mode;
the AP database is used for storing MAC information of the target terminal;
and the wireless driver is used for detecting the access control mode of the AP and establishing association or disconnecting association to the terminal according to the black and white list.
The invention has the beneficial effects that: the invention provides a method and a system for supporting a terminal to set a black and white list without disconnection, wherein after the black and white list of an AP is modified, a wireless drive of the AP actively refreshes the black and white list and detects whether an associated terminal and a new terminal sending an association request exist in the black and white list, and meanwhile, the association request, the active disconnection of the association or the active acceptance of the association request of the terminal are actively sent to the terminal according to an access control mode of the AP, so that the problems that the disconnection of the terminal is caused by the restart and the effect are caused and the manual reconnection is needed when an access control parameter is set in the existing home gateway are solved, and the use convenience of the AP is greatly improved.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "including" and "having," and any variations thereof, in the description and claims of this application and the description of the above figures are intended to cover non-exclusive inclusions. The terms "first," "second," and the like in the description and claims of this application or in the above-described drawings are used for distinguishing between different objects and not for describing a particular order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
Referring to fig. 1, a method for supporting a terminal to set a black-and-white list without dropping a line of the terminal of the present invention includes the following steps:
step 1: setting MAC information of a target terminal in a black and white list of an AP front-end visual interface;
step 2: the AP back end receives the MAC information of the target terminal and stores the MAC information into an AP database;
and step 3: the AP back end issues the MAC information of the target terminal to the wireless driver in a Wext mode;
and 4, step 4: after receiving the MAC information of the target terminal, the wireless driver stores and accesses the AP control structure, and refreshes a black and white list at the same time;
and 5: the wireless drive detects whether the AP opens an access control mode;
step 6: when the wireless driver detects that the AP opens the access control mode, the wireless driver detects whether the current AP has an associated terminal;
and 7: when the wireless driver detects that the current AP has the associated terminal, the wireless driver detects whether the current AP access control mode is an access allowing mode;
and 8: when the wireless driver detects that the current AP access control mode is an access allowing mode, the wireless driver detects whether the current associated terminal belongs to a white list or not;
and step 9: and when the wireless driver detects that the current associated terminal belongs to the white list, the wireless driver keeps continuously associating with the current associated terminal.
AP is an abbreviation of (Wireless) Access Point, i.e. (Wireless) Access Point. If the wireless network card is comparable to an ethernet card in a wired network, the AP is a HUB in a traditional wired network and is the most commonly used device for building a small wlan at present. The AP is equivalent to a bridge connecting a network and a wireless network, and mainly functions to connect wireless network clients together and then connect the wireless network to the ethernet (this is the meaning of Access Point name). At present, most wireless APs support functions of multi-user access, data encryption, multi-rate transmission and the like, and some products provide a perfect wireless network management function. For a small-range wireless local area network such as a home and an office, wireless access of all computers can be realized by only one wireless AP. The indoor coverage of the AP is generally 30m to 100m, and at present, AP products of many manufacturers can be interconnected to increase the coverage area of the WLAN. Just as the mobile phone can roam between the base stations, the wireless local area network terminal can also roam between the APs, and black and white lists are also widely applied in the APs.
Wext is a suite of interfaces defined by the developer Jean Tourrilhes (Hewlett packard laboratory software Engineer) for the user layer software to access the wireless driver and to drive the event notification user layer. In the implementation of the Wext interface, the application layer accesses the driver in an ioctl mode, sets wireless parameters or acquires the wireless parameters, and configures the wireless driver for networking operation. The transmission of the wireless driving event to the application layer adopts a netlink socket technology, namely a netlink route message technology. In this embodiment, the AP back end issues the target terminal MAC information to the wireless driver in a Wext manner, which is convenient, fast, accurate, and less prone to packet loss.
Referring to fig. 1, in step 5, when the wireless driver detects that the AP does not turn on the access control mode, the wireless driver allows all terminals to access actively, and at this time, the wireless driver does not perform association check between the black-and-white list and the terminals.
Referring to fig. 1, in step 6, when the wireless driver detects that there is no associated terminal in the current AP, the method further includes the following steps:
step 601: the wireless driver detects whether the current AP receives a new terminal association request;
step 602: when the wireless driver detects that the current AP receives a new terminal association request, the wireless driver detects whether the current AP access control mode is an access allowing mode;
step 603: when the wireless driver detects that the current AP access control mode is the access allowing mode, the wireless driver detects whether a current new terminal belongs to a white list or not;
step 604: and when the wireless driver detects that the current new terminal belongs to the white list, the wireless driver receives the association request of the current new terminal.
When the current AP access control mode is an access allowing mode, the wireless driver traverses the current new terminal information in a terminal list associated with the AP, and if the terminal information exists in the association list, namely in a white list, the wireless driver actively receives an association request of the current new terminal; if the terminal information does not exist in the association list, that is, does not exist in the white list, the wireless driver actively rejects the association request of the current new terminal.
Referring to fig. 1, in step 601, when the wireless driver detects that the current AP does not receive a new terminal association request, the wireless driver waits for the new terminal association request.
Referring to fig. 1, in step 602, when the wireless driver detects that the current AP access control mode is not the access permission mode, the wireless driver determines that the current AP is the access rejection mode, and detects whether the current new terminal belongs to a blacklist; when detecting that the current new terminal belongs to the blacklist list, the wireless drive actively rejects the association request of the current new terminal; and when detecting that the current new terminal does not belong to the blacklist, the wireless driver receives the association request of the current new terminal. When the current AP is in a mode of refusing access, the wireless driver traverses the current new terminal information in a terminal list associated with the AP, and if the terminal information exists in the association list, namely in a blacklist list, the wireless driver initiatively refuses the association request of the current new terminal; if the terminal information does not exist in the association list, that is, does not exist in the blacklist list, the wireless driver actively receives the association request of the current new terminal.
Referring to fig. 1, in step 603, when the wireless driver detects that the current new terminal does not belong to the white list, the wireless driver actively rejects the association request of the current new terminal.
Referring to fig. 1, in step 7, when the wireless driver detects that the current AP access control mode is not the access permission mode, the wireless driver determines that the AP access control mode is the access rejection mode, and detects whether the current associated terminal belongs to the blacklist.
Referring to fig. 1, when detecting that the current associated terminal belongs to the blacklist list, the wireless driver actively disconnects the current associated terminal; and when detecting that the current associated terminal does not belong to the blacklist list, the wireless driver keeps continuously associating with the current associated terminal.
Referring to fig. 1, in step 8, when the wireless driver detects that the current associated terminal does not belong to the white list, the wireless driver actively disconnects the connection of the current associated terminal.
Referring to fig. 1, the present invention further provides a system for implementing the method for supporting the terminal to set the black and white list without dropping the line, including:
the AP front end is used for setting MAC information of a target terminal in a black and white list;
the AP back end is used for storing the target terminal MAC information into an AP database after receiving the target terminal MAC information and sending the target terminal MAC information to the wireless driver in a Wext mode;
the AP database is used for storing MAC information of the target terminal;
and the wireless driver is used for detecting the access control mode of the AP and establishing association or disconnecting association to the terminal according to the black and white list.
From the above, the beneficial effects of the invention are as follows: the invention provides a method and a system for supporting a terminal to set a black and white list without disconnection, wherein after the black and white list of an AP is modified, a wireless drive of the AP actively refreshes the black and white list and detects whether an associated terminal and a new terminal sending an association request exist in the black and white list, and meanwhile, the association request, the active disconnection of the association or the active acceptance of the association request of the terminal are actively sent to the terminal according to an access control mode of the AP, so that the problems that the disconnection of the terminal is caused by the restart and the effect are caused and the manual reconnection is needed when an access control parameter is set in the existing home gateway are solved, and the use convenience of the AP is greatly improved.
The above-described embodiments are intended to be illustrative, and not restrictive, of the invention, and all such modifications and equivalents as may be included within the scope of the invention are intended to be included therein.