[go: up one dir, main page]

CN106330759A - Method and device for adjusting ACL table items - Google Patents

Method and device for adjusting ACL table items Download PDF

Info

Publication number
CN106330759A
CN106330759A CN201610865869.1A CN201610865869A CN106330759A CN 106330759 A CN106330759 A CN 106330759A CN 201610865869 A CN201610865869 A CN 201610865869A CN 106330759 A CN106330759 A CN 106330759A
Authority
CN
China
Prior art keywords
acl table
table item
entry number
item
acl
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201610865869.1A
Other languages
Chinese (zh)
Other versions
CN106330759B (en
Inventor
符志清
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou DPTech Technologies Co Ltd
Original Assignee
Hangzhou DPTech Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou DPTech Technologies Co Ltd filed Critical Hangzhou DPTech Technologies Co Ltd
Priority to CN201610865869.1A priority Critical patent/CN106330759B/en
Publication of CN106330759A publication Critical patent/CN106330759A/en
Application granted granted Critical
Publication of CN106330759B publication Critical patent/CN106330759B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2458Modification of priorities while in transit
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/625Queue scheduling characterised by scheduling criteria for service slots or service orders
    • H04L47/6275Queue scheduling characterised by scheduling criteria for service slots or service orders based on priority

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention provides a method and device for adjusting ACL table items. The method comprises the steps that a first ACL table item to be adjusted is acquired, and the first priority before the first ACL table item is adjusted and the second priority after the first ACL table item is adjusted are determined; the migratory direction of the first ACL table item is determined according to the first priority and the second priority; in the migratory direction, the adjusting position of the first ACL table item is determined; the first ACL table item is copied to the adjusting position, and the original first ACL table item is deleted. According to the method, the newly added ACL table items are firstly copied at the adjusting position, then the original ACL table items are deleted, the state that parts of the ACL table items are deleted does not occur, correct ACL table items are matched for messages, and the messages are correctly forwarded.

Description

A kind of method and device adjusting ACL table item
Technical field
The present invention relates to communication technical field, particularly relate to a kind of method and device adjusting ACL table item.
Background technology
ACL (Access Control List accesses and controls list) is a kind of flow access control technology, in ACL ACL table item is matching condition and the process action of message of a series of appointment message, when message is through the network equipment, by Join the matching condition in ACL table item, and according to corresponding process action, message is processed.
In prior art, when adjusting the priority relationship of existing ACL table item, need to delete the part ACL table in ACL , and increase this ACL table item in place newly.But when part ACL table item be deleted after, then increase newly this ACL table item it Before, if receiving the message mating this part ACL table item, the ACL table item of message matching error can be caused, cause the place to message Reason mistake.
Summary of the invention
The present invention provides a kind of method and device adjusting ACL table item, to solve in prior art when part ACL table item quilt After deletion, then before increasing this ACL table item newly, if receiving the message mating this part ACL table item, message coupling mistake can be caused ACL table item by mistake, the problem causing message processes mistake.
First aspect, the present invention provides a kind of method adjusting ACL table item, including:
Obtain the first ACL table item to be adjusted, after determining the first priority before described first ACL table item adjustment, adjustment The second priority;
According to the first priority and the second priority, determine the migratory direction of described first ACL table item;
In described migratory direction, determine the adjustment position of described first ACL table item;
Described first ACL table item is copied to described adjustment position, and deletes former first ACL table item.
Second aspect, the present invention provides a kind of device adjusting ACL table item, including:
First determines module, obtains the first ACL table item to be adjusted, determines first before described first ACL table item adjustment The second priority after priority, adjustment;
Second determines module, according to the first priority and the second priority, determines the migration side of described first ACL table item To;
3rd determines module, in described migratory direction, determines the adjustment position of described first ACL table item;
Replicate removing module, described first ACL table item is copied to described adjustment position, and deletes former first ACL table item.
From embodiments of the invention, obtain the first ACL table item to be adjusted, determine that described first ACL table item adjusts Before the first priority, adjust after the second priority, according to the first priority and the second priority, determine a described ACL The migratory direction of list item, in described migratory direction, determines the adjustment position of described first ACL table item, by described first ACL table Item copies to described adjustment position, and deletes former first ACL table item.Owing to the embodiment of the present invention is adjusting the preferential of ACL table item During level, first adjusting the ACL table item that position duplication is newly-increased, the most again by former ACL table entry deletion, do not havinging part ACL table item The state being deleted, therefore when receiving the message mating this part ACL table item, can mate correct ACL table item by message, And message is carried out correct forwarding.
Accompanying drawing explanation
Fig. 1 is an embodiment flow chart of a kind of method adjusting ACL table item of the present invention;
Fig. 2 is a kind of hardware structure diagram of a kind of device place equipment adjusting ACL table item of the present invention;
Fig. 3 is an embodiment block diagram of a kind of device adjusting ACL table item of the present invention.
Detailed description of the invention
For the technical scheme making those skilled in the art be more fully understood that in the embodiment of the present invention, and make the present invention real Execute the above-mentioned purpose of example, feature and advantage can become apparent from understandable, below in conjunction with the accompanying drawings to technical side in the embodiment of the present invention Case is described in further detail.
In the network equipment supporting chip ACL, generally all ACL table items all will not be opened to user, part ACL table Being set to user be the most configurable, this part ACL table item is referred to as the reserved chip ACL table item of system (follow-up referred to as Reserved ACL table item).The position of reserved ACL table item, but will not be user before or after all ACL table items that user can join Between the ACL table item that can join;The embodiment of the present invention obtains a reserved ACL table item from the ACL table item that system is reserved, and this is reserved ACL table item is an ACL table item temporarily can joined user, may be used for temporarily storing the ACL table item of a non-NULL, follow-up also Need to be available this list item.
The ACL table item can joined for user, is divided into again idle ACL table item and the busy ACL table item, idle ACL table item to be Referring to that contents in table is empty, busy ACL table item refers to that contents in table is not for sky.When message enters the network equipment, the network equipment will It is examined in whether each busy ACL table item mates this message, if coupling, performs to process accordingly action, and no longer Carry out subsequent match;If not mating, then continue to mate next busy ACL table item.
The embodiment of the present invention, is referred to as available ACL table item for the reserved ACL table item obtained and idle ACL table item, for Busy ACL table item is referred to as unavailable ACL table item.
For all ACL table items, according to its vertical order in ACL table, for each ACL table item (available ACL List item and unavailable ACL table item) an all corresponding position, e.g., the position that Article 1 ACL table item is corresponding is 1, Article 2 ACL table The position that item is corresponding is 2 ... by that analogy, it is n to the position that nth bar ACL table item is corresponding.
It addition, for every unavailable ACL table item, determine a priority value by its vertical relative position, more The priority of forward ACL table item is the highest, and corresponding priority value is the least, and the priority of ACL table item as unavailable in Article 1 is 1, the priority of Article 2 unavailable ACL table item is 2 ... by that analogy, it is N to the N article unavailable ACL table item priority. Owing to available ACL table item is without priority, the position that therefore ACL table item is corresponding is the most identical with priority value, but both of which is protected Card its value order from small to large from front to back.
See Fig. 1, for the embodiment flow chart adjusting ACL table item method that the present invention is a kind of, comprise the following steps:
Step 101: obtain the first ACL table item to be adjusted, determines that first before described first ACL table item adjustment is preferential The second priority after level, adjustment.
Step 102: according to the first priority and the second priority, determine the migratory direction of described first ACL table item.
In one example, when the first priority is more than the second priority, the migration side of described first ACL table item is determined To being that described first ACL table item is upwards migrated;
In another example, when the first priority is less than the second priority, determine the migration of described first ACL table item Direction is to be migrated downward into by described first ACL table item.
Step 103: in described migratory direction, determines the adjustment position of described first ACL table item.
In one example, when described migratory direction is upwards to be migrated by described first ACL table item, current second is determined The primary importance of the second ACL table item of priority;It is defined as a upper position of described primary importance or primary importance adjusting Position.
Wherein, it is defined as adjusting position process for a described upper position by described primary importance or primary importance, Can also include: start to travel through ACL table item the most successively from primary importance, determine the second of first available ACL table item Put;And add up the first entry number of ACL table item between primary importance and the second position;If the first entry number is 0, determine first A upper position of position is described adjustment position;If the first entry number is not 0, start to travel through ACL successively downwards from primary importance List item, determines the 3rd position of first available ACL table item;And add up between a upper position and the 3rd position of primary importance The second entry number of ACL table item;When the first entry number is less than the second entry number, determine that a upper position of primary importance is institute State adjustment position;When the first entry number is not less than the second entry number, determine that described primary importance is described adjustment position.
In another example, when described migratory direction is to be migrated downward into by described first ACL table item, determine ratio currently 4th position of the 3rd ACL table item of the second low one-level of priority;By described 4th position or a upper position of the 4th position It is defined as adjusting position.
Wherein, it is defined as adjusting position process for a described upper position by described 4th position or the 4th position, Can also include: start to travel through ACL table item the most successively from the 4th position, determine the 5th of first available ACL table item Put;And add up the 3rd entry number of ACL table item between the 4th position and the 5th position;If the 3rd entry number is 0, determine the 4th A upper position of position is described adjustment position;If the 3rd entry number is not 0, start from the 4th position to travel through ACL successively downwards List item, determines the 6th position of first available ACL table item;And add up between a upper position and the 6th position of the 4th position The 4th entry number of ACL table item;When the 3rd entry number is less than four entry number, determine that a upper position of the 4th position is institute State adjustment position;When the 3rd entry number is not less than four entry number, determine that described 4th position is described adjustment position.
Step 104: described first ACL table item is copied to described adjustment position, and deletes former first ACL table item.
Wherein, described described first ACL table item is copied to described adjustment position before, if the first entry number is not 0, when When first entry number is less than the second entry number, each ACL table item between primary importance and the second position is moved up one by one One position;When the first entry number is not less than the second entry number, between a upper position to the 3rd position of primary importance ACL table item moves down a position one by one.
If the 3rd entry number is not 0, when the 3rd entry number is less than four entry number, by the 4th position and the 5th position it Between each ACL table item move up a position one by one;When the 3rd entry number is not less than four entry number, by the 4th position A upper position to the 6th position between ACL table item move down a position one by one.
As seen from the above-described embodiment, obtain the first ACL table item to be adjusted, before determining that described first ACL table item adjusts The second priority after first priority, adjustment, according to the first priority and the second priority, determines described first ACL table item Migratory direction, in described migratory direction, determine the adjustment position of described first ACL table item, by multiple for described first ACL table item System is to described adjustment position, and deletes former first ACL table item.Owing to the embodiment of the present invention is when adjusting the priority of ACL table item, First adjusting the ACL table item that position duplication is newly-increased, the most again by former ACL table entry deletion, do not havinging part ACL table item and be deleted State, therefore when receiving the message mating this part ACL table item, message can be mated correct ACL table item, and to report Literary composition carries out correct forwarding.
With a concrete application example, the present invention will be described below, it is assumed that it is useful that reserved ACL table item is positioned at institute Before the ACL table item that family can be joined, the first ACL table item to be adjusted is list item a, and the first priority before list item a adjusts is x, tune The second priority after whole.
Step 1: obtain list item a to be adjusted, determines that second after the first priority x before the adjustment of list item a, adjustment is excellent First level y.
Step 2: according to x and y, determine the migratory direction of described list item a;
If x=y, process ends;Wherein, during x=y, illustrate that list item a is without movement.
If x > y, then perform step 3;Wherein, during x > y, illustrate that the migratory direction of list item a is upwards to be migrated by list item a, move After shifting, the priority of list item a uprises.
Assume as a example by ACL table shown in table 1, the x=4, the y=3 after adjustment before list item a adjustment.
Table 1
Position Title Content 1 Content 2
1 (reserving)
2 c
3 d
4 b
5 a
6 e
7 f
8
9
If x < y, then perform step 4;Wherein, x < during y, illustrates that the migratory direction of list item a is to be migrated downward into by list item a, moves The priority step-down of list item a after shifting.
Step 3: determine the position of the list item b of current priority y, and be designated as y1, and perform step 5.
Assume as a example by ACL table shown in table 1, determine the position y1=4 of list item b.
Step 4: determine the position of list item f than the current second low one-level of priority, be designated as y1, and perform step 5.
Step 5: start, from list item b, the ACL table item that travels through ACL table the most successively, find first available ACL table item Time, recording its position is z1, and adds up bar number n1 (the wherein n1=y1-1-of the unavailable ACL table item spanned from y1 to z1 Z1, does not include y1 itself).If n1=0, then show that the position of y1-1 is i.e. available ACL table item, the most directly perform step 10.Cause For there being reserved ACL table item, this process is sure looks for an available ACL table item.
Assume as a example by ACL table shown in table 1, start, from list item b, the ACL table item that traverses up ACL, find first can During with ACL table item, record its position z1=1, the then unavailable ACL table item number n1=y1-1-z1 from position 1 to position 4 =4-1-1=2.
Step 6: start to travel through the most successively the ACL table item ACL table from list item b, find first available ACL table item Time, record its position z2, and add up unavailable ACL table item between y1-1 to z2 bar number n2 (wherein n2=z2-y1, no Comprise y1-1).If not finding available list item, then n2 is designated as special super large value MAX (such as 10000000000, this value Exceed any chip ACL table item number).
Assume as a example by ACL table shown in table 1, start the ACL table item traversal down ACL from list item b, find first can During with ACL table item, record its position z2=8, the then unavailable ACL table item number n2=z2-y1=from position 3 to position 8 8-4=4.
Step 7: compare the value of n1 and n2, if n1 < n2, then performs step 8;If n1 >=n2, then perform step 10.
Wherein, when n1 < during n2, illustrates that the unavailable ACL table item number between y1 to z1 is less than between y1-1 to z2 not Available ACL table item number.Wherein, comprise the situation that n2 is MAX, now not can use ACL table item under explanation y1.
As n1 >=n2, illustrate that the unavailable ACL table item between y1 to z1 is no less than the unavailable ACL between y1-1 to z2 Entry number.
Assume as a example by ACL table shown in table 1, due to n1=2 < n2=4, then perform step 8.
Step 8: the ACL table item between the z1 to y1 of position is moved up a position one by one.
Wherein it is possible to the ACL table item (not comprising position z1, y1) between traversal position z1 to y1, from the ACL of position z1+1 List item starts, and current ACL table item copies to a upper position of current ACL table item, then deletes the ACL table item of current location, Until completing the movement of the ACL table item of position y1-1, then perform step 9.
Citing, it is assumed that as a example by ACL table shown in table 1, by the ACL table item that (do not includes position 0 and 3) between position 0 to 3 by Individual to one position of reach, obtain ACL as shown in table 2 after having moved.
Table 2
Position Title Content 1 Content 2
1 c
2 b
3
4 d
5 a
6 e
7 f
8
9
Step 9: reacquire list item a to be adjusted, copies to list item a position y1-1, and is deleted by former list item a.
Wherein, owing to, during above-mentioned mobile list item, the position of list item a may have occurred change, it is therefore desirable to weight New acquisition list item a.
Citing, it is assumed that as a example by ACL table shown in table 2, copies to list item a position 2, and is deleted by former list item a, after amendment ACL table as shown in table 3.
Table 3
Step 10: the ACL table item between the y1-1 to z2 of position is moved down a position one by one.
Wherein it is possible to the ACL table item (not comprising position y1-1, z2) between traversal position y1-1 to z2, from position z1+1 ACL table item start, current ACL table item is copied to the next position of current ACL table item, then deletes the ACL of current location List item, until completing the movement of the ACL table item of position y1, then performs step 11.
Step 11: reacquire list item a to be adjusted, copies to list item a position y1, and is deleted by former list item a.
Owing to reserved ACL table item can be joined for user temporarily, when receiving message, reserved ACL table will not be mated , need to carry out being adjusted to reserved ACL table item the process of available ACL table item:
Step 12: judge whether reserved ACL table item is available ACL table item.If it is not, then perform step 13;If it is, Process ends.
Step 13: first the ACL table item can joined from user starts all over ACL table, until finding first idle ACL table , its position is z0, then the ACL table item from reserved ACL table item to z0-1 is moved down a position one by one.
Citing, it is assumed that as a example by ACL table shown in table 3, begin stepping through user from position 1 and can join ACL table item, until finding one Individual idle ACL table item d, its position is z0=4, then will move down one by one from the ACL table item of reserved ACL table item to position 3 One position, obtains ACL table as shown in table 4.
In another preferred implementation, in the step 7 of above-mentioned application example, for n1 < n2, n2 ≠ MAX (table The item downward available free ACL table item of b), when reserved ACL table item is first the available ACL table item traversed up, it is first determined table Position x1 before item a adjustment, when x1+y1-2 < during z2-y1, performs step 8;Otherwise perform step 10.
Wherein, x1+y1-1 is the number of times sum assuming to carry out the ACL table item that step 8 and 13 needs movement, and wherein y1-1 is Performing the ACL table item number of times that step 8 moves, x1-1 is the ACL table item number of times that step 13 moves;Z2-y1 is that execution carries out step The 10 ACL table item numbers needing movement.
As a example by ACL table shown in table 1, the ACL table item number of times that execution step 8 moves is y1-1=3-1=2, by with reserved ACL table item is not available ACL table item, need to perform step 13, and the ACL table item number of times x1-1=5-1=4 that step 13 moves then walks Rapid 8 and step 13 to move ACL table item number of times altogether be 6;If performing step 10, by the ACL table item between position 3 to position 8 successively Moving down a position, mobile ACL table item number of times is z2-y1=8-4=4.Step is compared owing to execution step 10 moves down Rapid 8 and the ACL table item number of times that moves up of step 13 few, therefore when n1 < n2, n2 ≠ MAX (downward available free ACL table of list item b ), when reserved ACL table item is first the available ACL table item traversed up, optional execution step 10.
In another embodiment, during for a newly-increased ACL table item, owing to newly-increased ACL table item does not has current First priority, the second priority after the insertion ACL table of newly-increased ACL table item is y.Following steps can be performed: check user The ACL table item that can join is the fullest, if it is, process ends;If it is not, then perform in the step 3 of above-mentioned application example Determine the process of the primary importance of the second ACL table item of current second priority y, when execution step 9 or 11, without carrying out weight The new process obtaining newly-increased ACL table item, but directly newly-increased ACL table item is copied to position y1, remaining process and above-mentioned application Example is similar to.
Wherein, owing to user can not be joined by reserved ACL table item, this reserved ACL table item is not the most used in and E-Packets Time matching process, the ACL table item that therefore the present embodiment is newly-increased will not be inserted into reserved ACL table item, Reduplicated to avoid Perform step 12, the process of 13, cause the process performing operation complicated.
As seen from the above-described embodiment, obtain the first ACL table item to be adjusted, before determining that described first ACL table item adjusts The second priority after first priority, adjustment, according to the first priority and the second priority, determines described first ACL table item Migratory direction, in described migratory direction, determine the adjustment position of described first ACL table item, by multiple for described first ACL table item System is to described adjustment position, and deletes former first ACL table item.Owing to the embodiment of the present invention is when adjusting the priority of ACL table item, First adjusting the ACL table item that position duplication is newly-increased, the most again by former ACL table entry deletion, do not occurring that part ACL table item is deleted State, therefore when receiving the message mating this part ACL table item, message can be mated correct ACL table item, and to report Literary composition carries out correct forwarding;And when determining described adjustment position, it is possible to move number of times by less list item, determine described tune Whole position, it is possible to reduce unnecessary operation, reduces and equipment is processed resource consumption.
Corresponding with the embodiment of a kind of aforementioned method adjusting ACL table item, present invention also offers a kind of adjustment ACL table The embodiment of the device of item.
A kind of embodiment adjusting ACL table item device of the present invention can be applied on the network equipment supporting chip ACL.Dress Put embodiment to be realized by software, it is also possible to realize by the way of hardware or software and hardware combining.Implemented in software it is Example, as the device on a logical meaning, is to support that the processor of the network equipment of chip ACL is by non-volatile by its place Property memorizer in corresponding computer program instructions read internal memory runs and formed.For hardware view, such as Fig. 2 institute Show, for a kind of hardware structure diagram of the network equipment of a kind of support chip ACL adjusting ACL table item device place of the present invention, remove Outside processor shown in Fig. 2, internal memory, network interface and nonvolatile memory, the support at device place in embodiment The network equipment of chip ACL is generally according to the actual functional capability of this equipment, it is also possible to includes other hardware, repeats no more this.
Seeing Fig. 3, for a kind of embodiment block diagram adjusting ACL table item device of the present invention, described device includes: the One determine module 310, second determine module the 320, the 3rd determine module 330, replicate removing module 340.
Wherein, first determines module 310, obtains the first ACL table item to be adjusted, determines that described first ACL table item adjusts Before the first priority, adjust after the second priority;
Second determines module 320, according to the first priority and the second priority, determines the migration of described first ACL table item Direction;
3rd determines module 330, in described migratory direction, determines the adjustment position of described first ACL table item;
Replicate removing module 340, described first ACL table item is copied to described adjustment position, and deletes former first ACL table ?.
Described second determines module 320, for according to the first priority and the second priority, determines described first ACL table The process of the migratory direction of item, when the first priority is more than the second priority, for determining the migration of described first ACL table item Direction is upwards to be migrated by described first ACL table item;When the first priority is less than the second priority, it is used for determining described first The migratory direction of ACL table item is to be migrated downward into by described first ACL table item.
Described 3rd determines module 330, in described migratory direction, determines the adjustment position of described first ACL table item The process put, when second determines that module determines that described migratory direction is upwards to be migrated by described first ACL table item, determines current The primary importance of the second ACL table item of the second priority;A upper position of described primary importance or primary importance is defined as Adjust position;
When described second determines that module determines that migratory direction is to be migrated downward into by described first ACL table item, determine that ratio is worked as 4th position of the 3rd ACL table item of the front second low one-level of priority;By described 4th position or upper one of the 4th position Put and be defined as adjusting position.
Described 3rd determines module 330, for a upper position of described primary importance or primary importance is defined as tune The process of whole position, starts to travel through ACL table item the most successively from primary importance, determines the second of first available ACL table item Position;And add up the first entry number of ACL table item between primary importance and the second position;If the first entry number is 0, determine A upper position of one position is described adjustment position;If the first entry number is not 0, start to travel through successively downwards from primary importance ACL table item, determines the 3rd position of first available ACL table item;And add up a upper position and the 3rd position of primary importance Between the second entry number of ACL table item;When the first entry number is less than the second entry number, determine a upper position of primary importance For described adjustment position;When the first entry number is not less than the second entry number, determine that described primary importance is described adjustment position.
Described 3rd determines module 330, for a upper position of described 4th position or the 4th position is defined as tune The process of whole position, starts to travel through ACL table item the most successively from the 4th position, determines the 5th of first available ACL table item the Position;And add up the 3rd entry number of ACL table item between the 4th position and the 5th position;If the 3rd entry number is 0, determine A upper position of four positions is described adjustment position;If the 3rd entry number is not 0, start from the 4th position to travel through successively downwards ACL table item, determines the 6th position of first available ACL table item;And add up a upper position and the 6th position of the 4th position Between the 4th entry number of ACL table item;When the 3rd entry number is less than four entry number, determine a upper position of the 4th position For described adjustment position;When the 3rd entry number is not less than four entry number, determine that described 4th position is described adjustment position.
Described device can also include: mobile module 350, is used for replicating removing module and is replicated by described first ACL table item To described adjustment position, and before deleting former first ACL table item, if the first entry number is not 0, when the first entry number is less than second During entry number, each ACL table item between primary importance and the second position is moved up a position one by one;When the first list item When number is not less than the second entry number, the ACL table item between a upper position to the 3rd position of primary importance is moved down one by one One position.
If the 3rd entry number is not 0, when the 3rd entry number is less than four entry number, by the 4th position and the 5th position it Between each ACL table item move up a position one by one;When the 3rd entry number is not less than four entry number, by the 4th position A upper position to the 6th position between ACL table item move down a position one by one.
In said apparatus, the function of modules and the process that realizes of effect specifically refer to corresponding step in said method Realize process, do not repeat them here.
For device embodiment, owing to it corresponds essentially to embodiment of the method, so relevant part sees method in fact The part executing example illustrates.Device embodiment described above is only schematically, wherein said as separating component The module illustrated can be or may not be physically separate, and the parts shown as module can be or can also It not physical module, i.e. may be located at a place, or can also be distributed on multiple mixed-media network modules mixed-media.Can be according to reality Need to select some or all of module therein to realize the purpose of the present invention program.Those of ordinary skill in the art are not paying In the case of going out creative work, i.e. it is appreciated that and implements.
As seen from the above-described embodiment, this device obtains the first ACL table item to be adjusted, determines that described first ACL table item is adjusted The first priority before whole, the second priority after adjustment, according to the first priority and the second priority, determine described first The migratory direction of ACL table item, in described migratory direction, determines the adjustment position of described first ACL table item, by described first ACL table item copies to described adjustment position, and deletes former first ACL table item.Owing to the embodiment of the present invention is adjusting ACL table item During priority, first adjusting the ACL table item that position duplication is newly-increased, the most again by former ACL table entry deletion, do not havinging part ACL The state that list item is deleted, therefore when receiving the message mating this part ACL table item, can mate correct ACL by message List item, and message is carried out correct forwarding.
Those skilled in the art, after considering description and putting into practice invention disclosed herein, will readily occur to its of the present invention Its embodiment.The application is intended to any modification, purposes or the adaptations of the present invention, these modification, purposes or Person's adaptations is followed the general principle of the present invention and includes the undocumented common knowledge in the art of the present invention Or conventional techniques means.Description and embodiments is considered only as exemplary, and true scope and spirit of the invention are by following Claim is pointed out.
It should be appreciated that the invention is not limited in precision architecture described above and illustrated in the accompanying drawings, and And various modifications and changes can carried out without departing from the scope.The scope of the present invention is only limited by appended claim.

Claims (10)

1. the method adjusting access control list ACL list item, ACL table includes multiple ACL table item, the plurality of ACL table Item priority from top to bottom reduces successively, it is characterised in that described method includes:
Obtain the first ACL table item to be adjusted, determine described first ACL table item adjust before the first priority, adjust after the Two priority;
According to the first priority and the second priority, determine the migratory direction of described first ACL table item;
In described migratory direction, determine the adjustment position of described first ACL table item;
Described first ACL table item is copied to described adjustment position, and deletes former first ACL table item.
Method the most according to claim 1, it is characterised in that described according to the first priority with the second priority, determines The migratory direction of described first ACL table item, including:
When the first priority is more than the second priority, determine that the migratory direction of described first ACL table item is by a described ACL List item upwards migrates;
When the first priority is less than the second priority, determine that the migratory direction of described first ACL table item is by a described ACL List item migrates downward into.
Method the most according to claim 2, it is characterised in that described in described migratory direction, determines a described ACL The adjustment position of list item, including:
When described migratory direction is upwards to be migrated by described first ACL table item, determine the second ACL table of current second priority The primary importance of item;It is defined as a upper position of described primary importance or primary importance adjusting position;
When described migratory direction is to be migrated downward into by described first ACL table item, determine than the current second low one-level of priority 4th position of the 3rd ACL table item;It is defined as a upper position of described 4th position or the 4th position adjusting position.
Method the most according to claim 3, it is characterised in that described by described primary importance or upper the one of primary importance Position is defined as adjusting position, including:
Start to travel through ACL table item the most successively from primary importance, determine the second position of first available ACL table item;And unite First entry number of the ACL table item between meter primary importance and the second position;
If the first entry number is 0, determine that a upper position of primary importance is described adjustment position;
If the first entry number is not 0, starts traversal ACL table item the most successively from primary importance, determine first available ACL table 3rd position of item;And add up the second entry number of ACL table item between a upper position and the 3rd position of primary importance;
When the first entry number is less than the second entry number, determine that a upper position of primary importance is described adjustment position;When first When entry number is not less than the second entry number, determine that described primary importance is described adjustment position.
Method the most according to claim 4, it is characterised in that described described first ACL table item is copied to described adjustment Before position, described method also includes:
If the first entry number is not 0, when the first entry number is less than the second entry number, by between primary importance and the second position Each ACL table item moves up a position one by one;When the first entry number is not less than the second entry number, upper by primary importance Each ACL table item between one position to the 3rd position moves down a position one by one.
Method the most according to claim 3, it is characterised in that described by described 4th position or upper the one of the 4th position Position is defined as adjusting position, including:
Start to travel through ACL table item the most successively from the 4th position, determine the 5th position of first available ACL table item;And unite Count the 3rd entry number of ACL table item between the 4th position and the 5th position;
If the 3rd entry number is 0, determine that a upper position of the 4th position is described adjustment position;
If the 3rd entry number is not 0, starts traversal ACL table item the most successively from the 4th position, determine first available ACL table 6th position of item;And add up the 4th entry number of ACL table item between a upper position and the 6th position of the 4th position;
When the 3rd entry number is less than four entry number, determine that a upper position of the 4th position is described adjustment position;When the 3rd When entry number is not less than four entry number, determine that described 4th position is described adjustment position.
Method the most according to claim 6, it is characterised in that described described first ACL table item is copied to described adjustment Before position, described method also includes:
If the 3rd entry number is not 0, when the 3rd entry number is less than four entry number, by between the 4th position and the 5th position Each ACL table item moves up a position one by one;When the 3rd entry number is not less than four entry number, upper by the 4th position ACL table item between one position to the 6th position moves down a position one by one.
8. adjusting a device for ACL table item, ACL table includes multiple ACL table item, and the plurality of ACL table item is the most excellent First level reduces successively, it is characterised in that described device includes:
First determines module, obtains the first ACL table item to be adjusted, determines that first before described first ACL table item adjustment is preferential The second priority after level, adjustment;
Second determines module, according to the first priority and the second priority, determines the migratory direction of described first ACL table item;
3rd determines module, in described migratory direction, determines the adjustment position of described first ACL table item;
Replicate removing module, described first ACL table item is copied to described adjustment position, and deletes former first ACL table item.
Device the most according to claim 8, it is characterised in that
Described second determines module, for according to the first priority and the second priority, determines the migration of described first ACL table item The process in direction, when the first priority is more than the second priority, the migratory direction for determining described first ACL table item be by Described first ACL table item upwards migrates;When the first priority is less than the second priority, it is used for determining described first ACL table item Migratory direction be that described first ACL table item is migrated downward into;
Described 3rd determines module, in described migratory direction, determining the mistake adjusting position of described first ACL table item Journey, when second determines that module determines that described migratory direction is upwards to be migrated by described first ACL table item, determines current second excellent The primary importance of the second ACL table item of first level;It is defined as a upper position of described primary importance or primary importance adjusting position Put;When described second determines that module determines that migratory direction is to be migrated downward into by described first ACL table item, determine ratio current second 4th position of the 3rd ACL table item of the low one-level of priority;A upper position of described 4th position or the 4th position is determined For adjusting position.
Device the most according to claim 9, it is characterised in that
Described 3rd determines module, for a upper position of described primary importance or primary importance is defined as adjustment position Process, starts to travel through ACL table item the most successively from primary importance, determines the second position of first available ACL table item;And unite First entry number of the ACL table item between meter primary importance and the second position;If the first entry number is 0, determine primary importance A upper position is described adjustment position;If the first entry number is not 0, start traversal ACL table item the most successively from primary importance, really 3rd position of fixed first available ACL table item;And add up the ACL table between a upper position and the 3rd position of primary importance Second entry number of item;When the first entry number is less than the second entry number, determine that a upper position of primary importance is described adjustment Position;When the first entry number is not less than the second entry number, determine that described primary importance is described adjustment position;
Described 3rd determines module, for a upper position of described 4th position or the 4th position is defined as adjustment position Process, starts to travel through ACL table item the most successively from the 4th position, determines the 5th position of first available ACL table item;And unite Count the 3rd entry number of ACL table item between the 4th position and the 5th position;If the 3rd entry number is 0, determine the 4th position A upper position is described adjustment position;If the 3rd entry number is not 0, start traversal ACL table item the most successively from the 4th position, really 6th position of fixed first available ACL table item;And add up the ACL table between a upper position and the 6th position of the 4th position 4th entry number of item;When the 3rd entry number is less than four entry number, determine that a upper position of the 4th position is described adjustment Position;When the 3rd entry number is not less than four entry number, determine that described 4th position is described adjustment position.
CN201610865869.1A 2016-09-29 2016-09-29 A kind of method and device adjusting ACL table item Active CN106330759B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610865869.1A CN106330759B (en) 2016-09-29 2016-09-29 A kind of method and device adjusting ACL table item

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610865869.1A CN106330759B (en) 2016-09-29 2016-09-29 A kind of method and device adjusting ACL table item

Publications (2)

Publication Number Publication Date
CN106330759A true CN106330759A (en) 2017-01-11
CN106330759B CN106330759B (en) 2019-09-17

Family

ID=57820978

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610865869.1A Active CN106330759B (en) 2016-09-29 2016-09-29 A kind of method and device adjusting ACL table item

Country Status (1)

Country Link
CN (1) CN106330759B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108696496A (en) * 2017-03-31 2018-10-23 慧与发展有限责任合伙企业 Multi-protocols accesses control list
CN109688126A (en) * 2018-12-19 2019-04-26 迈普通信技术股份有限公司 A kind of data processing method, the network equipment and computer readable storage medium
CN110191135A (en) * 2019-06-11 2019-08-30 杭州迪普信息技术有限公司 ACL configuration method, device, electronic equipment
WO2022042742A1 (en) * 2020-08-31 2022-03-03 中兴通讯股份有限公司 Acl rule processing method and apparatus, computer device, and readable medium
CN115913661A (en) * 2022-10-31 2023-04-04 北京力控华康科技有限公司 ACL rule sorting adjustment method, device, computer equipment and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101534301A (en) * 2009-04-13 2009-09-16 北京星网锐捷网络技术有限公司 List item installation method and device as well as network equipment
CN101866357A (en) * 2010-06-11 2010-10-20 福建星网锐捷网络有限公司 Method and device for updating items of three-state content addressing memory
CN103701639A (en) * 2013-12-17 2014-04-02 上海斐讯数据通信技术有限公司 ACL (Access Control List) collocation method and system
US20150378822A1 (en) * 2014-06-30 2015-12-31 Cleversafe, Inc. Recovering an encoded data slice in a dispersed storage network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101534301A (en) * 2009-04-13 2009-09-16 北京星网锐捷网络技术有限公司 List item installation method and device as well as network equipment
CN101866357A (en) * 2010-06-11 2010-10-20 福建星网锐捷网络有限公司 Method and device for updating items of three-state content addressing memory
CN103701639A (en) * 2013-12-17 2014-04-02 上海斐讯数据通信技术有限公司 ACL (Access Control List) collocation method and system
US20150378822A1 (en) * 2014-06-30 2015-12-31 Cleversafe, Inc. Recovering an encoded data slice in a dispersed storage network

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108696496A (en) * 2017-03-31 2018-10-23 慧与发展有限责任合伙企业 Multi-protocols accesses control list
CN109688126A (en) * 2018-12-19 2019-04-26 迈普通信技术股份有限公司 A kind of data processing method, the network equipment and computer readable storage medium
CN109688126B (en) * 2018-12-19 2021-08-17 迈普通信技术股份有限公司 Data processing method, network equipment and computer readable storage medium
CN110191135A (en) * 2019-06-11 2019-08-30 杭州迪普信息技术有限公司 ACL configuration method, device, electronic equipment
CN110191135B (en) * 2019-06-11 2021-09-21 杭州迪普信息技术有限公司 ACL configuration method, device and electronic equipment
WO2022042742A1 (en) * 2020-08-31 2022-03-03 中兴通讯股份有限公司 Acl rule processing method and apparatus, computer device, and readable medium
CN115913661A (en) * 2022-10-31 2023-04-04 北京力控华康科技有限公司 ACL rule sorting adjustment method, device, computer equipment and medium

Also Published As

Publication number Publication date
CN106330759B (en) 2019-09-17

Similar Documents

Publication Publication Date Title
CN106330759A (en) Method and device for adjusting ACL table items
CN107710200B (en) System and method for parallelizing hash-based operators in SMP databases
CN103246549B (en) A kind of method and system of data conversion storage
CN108804483A (en) Rendering intent, server and the computer readable storage medium of the cell page
CN115129782B (en) Partition level connection method and device for distributed database
CN104423982B (en) The processing method and processing equipment of request
CN111143331B (en) Data migration method, device and computer storage medium
US9977804B2 (en) Index updates using parallel and hybrid execution
WO2019085709A1 (en) Pooling method and system applied to convolutional neural network
CN109947738A (en) Data transfer system and method
KR101279805B1 (en) Auto object placement based electronic document editing apparatus and method
CN107315863A (en) Layout optimization method and device, terminal and storage medium
CN104281369A (en) Picture uploading processing method and device
CN106598874A (en) Method and device for automatically testing software
CN113792026A (en) Deployment method and device of database script and computer readable storage medium
CN115658966A (en) Method and device for generating generalized intelligent driving scenes
CN103593447A (en) Data processing method and device applied to database table
CN110019380B (en) Data query method, device, server and storage medium
CN109885642A (en) Classification storage method and device towards full-text search
CN104199738B (en) A kind of more data processing equipment collaboration working methods and system
CN111414422A (en) Data distribution method, device, equipment and storage medium
CN105653348A (en) Virtual machine clone method and system
CN110928860A (en) Data migration method and device
CN106354894A (en) A layout method and system for an analog circuit
US8479138B1 (en) Global constraint optimization

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Binjiang District and Hangzhou city in Zhejiang Province Road 310051 No. 68 in the 6 storey building

Applicant after: Hangzhou Dipu Polytron Technologies Inc

Address before: Binjiang District and Hangzhou city in Zhejiang Province Road 310051 No. 68 in the 6 storey building

Applicant before: Hangzhou Dipu Technology Co., Ltd.

GR01 Patent grant
GR01 Patent grant