A message processing method and device

By using the first ACL table entry and the second ACL table entry to match the IPv6 message source address in the network device, the problem of falsely discarding legal messages in the attack on fake IPv6 source address is solved, simplifying the configuration process and reducing network maintenance Difficulty.

CN115277097BActive Publication Date: 2024-12-03新华三技术有限公司合肥分公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210742943.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-28
Publication Date
2024-12-03
Estimated Expiration
2042-06-28

Smart Images

  • Figure CN115277097B_ABST
    Figure CN115277097B_ABST
Patent Text Reader

Abstract

The present application provides a message processing method and device, which relates to the field of communication technology. The method is applied to a first network device that enables the SAVA‑P function, wherein the first network device receives an IPv6 message; according to the source address of the IPv6 message, the first ACL table item corresponding to the input interface of the IPv6 message is queried, and the first ACL table item includes the corresponding relationship between the interface identifier of the input interface and the source prefix information of the message allowed to be released by the input interface; if the source address matches the first ACL table item, the IPv6 message is forwarded; if the source address does not match the first ACL table item, the second ACL table item is queried according to the source address of the IPv6 message, and the second ACL table item includes the source prefix information of the historical record; if the source address does not match the second ACL table item, the IPv6 message is forwarded; if the source address matches the second ACL table item, the IPv6 message is discarded.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a message processing method and device. Background Art

[0002] With the development of the Internet, by the end of 2019, all 4.29 billion IPv4 addresses in the world had been allocated, and IPv6 addresses were therefore highly recommended. The traditional IPv6 protocol currently only forwards messages and does not verify the IPv6 address of the forwarded message. There is currently no mature security technology to solve the problem of attacks by spoofing IPv6 source addresses, resulting in a major network security problem.

[0003] Based on this, the next generation Internet real source address verification architecture (Source Address Validation Architecture, SAVA) is provided. The architecture is divided into three layers: intra-domain, inter-domain and access network. The SAVA-P (Source Address Verification Architecture Protocol) function located in the domain is generally deployed on the edge device in the backbone network connected to the access network. From the perspective of application scenarios and deployment locations, it can be divided into the user side and the network side. Figure 1 In the IPv6 multi-access networking environment shown in the figure, device A is connected to device B, device A is connected to backbone network device G, and device A is connected to one side of device C. In order to prevent attacks from spoofing IPv6 source addresses, the strict URPF (Unicast Reverse Path Forwarding) function is enabled on the interface of device G, and the legitimacy of the message is judged only by local routing information. When legitimate traffic from outside the domain that has no routing table entry in G passes through, it will be discarded by mistake.

[0004] In order to solve this problem, a method of using URPF function in conjunction with Access Control Lists (ACL) is currently proposed. When the user confirms that the messages with certain characteristics are legal, these messages can be specified in the ACL, so that these messages will not be discarded when the reverse route does not exist, and will not be discarded by mistake. However, in this method, under the premise of implementing the verification of the spoofed IPv6 source address, the user needs to manually configure the ACL list, which will increase the complexity of configuration and increase the difficulty of network maintenance.

[0005] Therefore, how to solve the problem of erroneous packet discarding without the need for manual configuration by the user in the case of an attack on the spoofed IPv6 source address is one of the technical issues worth considering. Summary of the invention

[0006] In view of this, the present application provides a message processing method and device, which can solve the problem of erroneous message discarding without manual configuration by the user in the case of an attack to solve the problem of counterfeit IPv6 source address.

[0007] Specifically, the present application is implemented through the following technical solutions:

[0008] According to a first aspect of the present application, a message processing method is provided, which is applied to a first network device enabling a SAVA-P function, and the method includes:

[0009] Receive IPv6 packets;

[0010] According to the source address of the IPv6 message, query the first ACL table item corresponding to the inbound interface of the IPv6 message, wherein the first ACL table item includes the correspondence between the interface identifier of the inbound interface and the source prefix information of the message allowed to be released by the inbound interface;

[0011] If the source address matches the first ACL entry, forwarding the IPv6 message;

[0012] If the source address does not match the first ACL entry, querying a second ACL entry according to the source address of the IPv6 message, wherein the second ACL entry includes source prefix information of the historical record;

[0013] If the source address does not match the second ACL entry, forwarding the IPv6 message;

[0014] If the source address matches the second ACL entry, the IPv6 message is discarded.

[0015] According to a second aspect of the present application, there is provided a message processing device, which is arranged in a first network device enabling a SAVA-P function, and the device includes:

[0016] A receiving module, used for receiving IPv6 packets;

[0017] A first query module, used to query a first ACL table item corresponding to the inbound interface of the IPv6 message according to the source address of the IPv6 message, wherein the first ACL table item includes a correspondence between an interface identifier of the inbound interface and source prefix information of the message allowed to be released by the inbound interface;

[0018] a forwarding module, configured to forward the IPv6 message if the query result of the first query module is that the source address matches the first ACL entry;

[0019] A second query module, configured to query a second ACL entry according to the source address of the IPv6 message if the query result of the first query module is that the source address does not match the first ACL entry, wherein the second ACL entry includes source prefix information of the historical record;

[0020] The forwarding module is further configured to forward the IPv6 message if the query result of the second query module is that the source address does not match the second ACL entry;

[0021] A discarding module is used to discard the IPv6 message if the query result of the second query module is that the source address matches the second ACL table item.

[0022] According to a third aspect of the present application, a network device is provided, including a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores a computer program that can be executed by the processor, and the processor is prompted by the computer program to execute the method provided in the first aspect of the embodiment of the present application.

[0023] According to the fourth aspect of the present application, a machine-readable storage medium is provided, which stores a computer program. When called and executed by a processor, the computer program prompts the processor to execute the method provided in the first aspect of the embodiment of the present application.

[0024] Beneficial effects of the embodiments of the present application:

[0025] In the message processing method and apparatus provided in the embodiment of the present application, after receiving the IPv6 message, the first network device first queries the first ACL table item corresponding to the input interface of the IPv6 message according to the source address of the IPv6 message. Since the first ACL table item includes the correspondence between the interface identifier of the input interface and the source prefix information of the message allowed to be released by the input interface, it can be confirmed whether the source prefix information of the source address of the IPv6 message is in the first ACL list. If it exists, it is confirmed that the source address matches the first ACL table item, indicating that the source address of the IPv6 message is legal, and the IPv6 message is forwarded; if the source address does not match the first ACL table item, then in order to avoid the mistaken discarding of legal IPv6 messages, the present application proposes to query the second ACL table item according to the source address of the IPv6 message. Since the second ACL table item includes the historical record source prefix information, when it is confirmed that the source address does not match the second ACL item, it indicates that the source address of the IPv6 message does not match the first ACL item and the second ACL item, it may be legal traffic, and the IPv6 message is forwarded; if the source address matches the second ACL item, it indicates that the IPv6 message did not hit the first ACL item, but hit the second ACL item. Since the first ACL item records the legal source prefix information, it indicates that the source prefix information of the IPv6 message is illegal, and the IPv6 message can be discarded at this time. In this way, on the one hand, the legitimacy of the source address of the received IPv6 message is verified, and at the same time, the normal forwarding of the IPv6 message that passes the verification is guaranteed, solving the problem of mistaken discarding of legal IPv6 messages; on the other hand, the discarding of IPv6 messages that fail the verification is also realized. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 This is a schematic diagram of the structure of an IPv6 multi-access networking environment provided by this application;

[0027] Figure 2 It is a flowchart of a message processing method provided in an embodiment of the present application;

[0028] Figure 3 This is a schematic diagram of an application scenario of a message processing method provided in an embodiment of the present application;

[0029] Figure 4 It is a hardware structure diagram of a network device implementing a message processing method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0030] Here, exemplary embodiments will be described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application.

[0031] The terms used in this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in this article refers to and includes any or all possible combinations of one or more corresponding listed items.

[0032] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0033] The message processing method provided by this application is described in detail below.

[0034] See also Figure 2 , Figure 2 This is a flow chart of a message processing method provided by the present application. The method can be applied to a first network device with SAVA-P function enabled. The first network device can be, but is not limited to, a backbone network device. When the first network device implements the method, the following steps may be included:

[0035] S201. Receive an IPv6 message.

[0036] S202. According to the source address of the IPv6 message, query the first ACL entry corresponding to the inbound interface of the IPv6 message. If there is a match, execute step S203; if there is no match, execute step S204.

[0037] The first ACL entry includes a correspondence between the interface identifier of the inbound interface and source prefix information of packets allowed to be passed by the inbound interface.

[0038] In this step, in the forwarding plane, after the first network device receives the IPv6 message, it can be confirmed that the IPv6 message enters the interface of the first network device, which is recorded as the above-mentioned inbound interface. In order to implement the legitimacy check of the source address (source IPv6 address) in the IPv6 message, the present embodiment pre-configures a corresponding first ACL table item for each inbound interface, and the first ACL table item stores the interface identifier of the inbound interface and the source prefix information of the legal IPv6 address on the inbound interface. In this way, when the IPv6 message is received, the source address can be extracted from the IPv6 message, and then the source prefix information of the source address can be determined, so as to match the first ACL table item based on the source prefix information and the above-mentioned determined inbound interface.

[0039] On this basis, when matching the first ACL table item, it will be determined whether the correspondence between the source prefix information determined based on the IPv6 message and the input interface corresponding to the IPv6 is consistent with the correspondence between the interface identifier and the source prefix information stored in the first ACL table item. When they are consistent, it indicates that the source address of the IPv6 message is legal, that is, the address legitimacy check of the IPv6 message is passed. Then, in order to ensure normal processing of the message, after the source address check of the IPv6 message is passed, it is forwarded to the IPv6 message, that is, step S203 is executed.

[0040] S203: Forward the IPv6 message.

[0041] S204. Query the second ACL entry according to the source address of the IPv6 message. If there is no match, execute step S203; if there is a match, execute step S205.

[0042] The second ACL entry includes source prefix information of the historical record.

[0043] In this step, when the source address of the IPv6 message does not match the first ACL table item, it indicates that the IPv6 message may be a message that fails the source address check, or it may be a message that is outside the domain and legal but has not been recorded by the first network device. In view of this, in order to avoid directly discarding the IPv6 message and causing the legal message to be discarded, this step proposes to pre-configure the second ACL table item, that is, write the source prefix information corresponding to the source address of the IPv6 message received historically by the first network device into the second ACL table item. In this way, the second ACL table item can be queried based on the source address of the IPv6 message received this time, that is, the source prefix information of the source address of the IPv6 message is first matched with the second ACL table item.

[0044] On this basis, when matching the second ACL table item, it can be determined whether the second ACL table item includes the source prefix information of the above-mentioned source address. When it is included, it indicates that the source address of the IPv6 message is a message that has not passed the check, and the IPv6 message can be directly discarded, that is, executing step S205; when it is confirmed that the second ACL table item does not include the source prefix information of the above-mentioned source address, it indicates that the IPv6 message may be a legitimate message outside the type domain, and the IPv6 message is directly forwarded, that is, executing step S203. In this way, it is possible to implement the legitimacy check of the received IPv6 message and ensure the normal forwarding of the legitimate IPv6 message, thereby avoiding the accidental discarding of the legitimate IPv6 message.

[0045] S105: discard the IPv6 message.

[0046] By implementing the message processing method provided by the present application, after receiving an IPv6 message, first, according to the source address of the IPv6 message, the first ACL table item corresponding to the inbound interface of the IPv6 message is queried. Since the first ACL table item includes the correspondence between the interface identifier of the inbound interface and the source prefix information of the message allowed to be released by the inbound interface, it can be confirmed whether the source prefix information of the source address of the IPv6 message is in the first ACL list. If it exists, it is confirmed that the source address matches the first ACL table item, indicating that the source address of the IPv6 message is legal, and the IPv6 message is forwarded; if the source address does not match the first ACL table item, then in order to avoid the mistaken discarding of the legal IPv6 message, the present application proposes to query the second ACL table item according to the source address of the IPv6 message. Since the second ACL table item includes the source prefix information of the historical record When it is confirmed that the source address does not match the second ACL item, it indicates that the source address of the IPv6 message does not match both the first ACL item and the second ACL item, and it may be legal traffic, so the IPv6 message is forwarded; if the source address matches the second ACL item, it indicates that the IPv6 message does not hit the first ACL item, but hits the second ACL item. Since the first ACL item records legal source prefix information, it indicates that the source prefix information of the IPv6 message is illegal, and the IPv6 message can be discarded at this time. In this way, on the one hand, the legitimacy of the source address of the received IPv6 message is verified, and at the same time, the normal forwarding of the IPv6 message that passes the verification is guaranteed, solving the problem of mistaken discarding of legal IPv6 messages; on the other hand, the discarding of IPv6 messages that fail the verification is also realized.

[0047] Optionally, the first ACL table entry corresponding to each input interface in the first network device can be generated according to the following method: receiving the user-side routing information collected by the second network device and reported by each second network device; generating a SAVA-P table entry based on the routing information and the input interface of the routing information, the SAVA-P table entry including the interface identifier of the input interface and the source prefix information of the source address in the routing information; generating the first ACL table entry of the input interface based on the SAVA-P table entry, the execution action in the first ACL table entry being release.

[0048] Specifically, in this embodiment, the SAVA-P function can be enabled on the direct connection interface of the first network device and the second network device, that is, the network side source address check function is executed, and then the access network connected to the second network device is set to the user side. In this way, the second network device will collect the routing information of the access network configured as the user side that accesses the second network device, and then report the collected routing information to the first network device. Specifically, the second network device can send the routing information to the first network device through the TCP protocol.

[0049] It is worth noting that there may be multiple second network devices directly connected to the first network device, and the specific number may depend on the actual application scenario.

[0050] On this basis, on the control plane, when the first network device receives the routing information sent by each second network device, since the first network device is directly connected to the second network device, the first network device can determine the interface identifier of each routing information entering the first network device's input interface, and can also parse the source address from the routing information, and then determine the source prefix information of the source address, so that the source prefix information corresponding to each input interface can be determined, and then a SAVA-P table entry is generated based on the interface identifier of each input interface and the determined source prefix information. Furthermore, based on the SAVA-P table entry, the source prefix information of the legal source address under the input interface is filtered out in the SAVA-P table entry, with each input interface as a unit, and then the filtered information is used to form an interface-level table entry, which at least includes the interface identifier of the input interface and the legal source prefix information.

[0051] On this basis, for each input interface in the interface-level table entry, the source prefix information that has passed the source address check corresponding to the input interface in the table entry and the interface identifier of the input interface are written into the first ACL table entry. In addition, since the source prefix information in the first ACL table entry is legal, in view of this, the message hitting the first ACL table entry should be released. Therefore, in order to facilitate subsequent message processing, the execution action in the first ACL table entry will be configured to release, and then the first ACL table entry will be sent to the corresponding input interface. In this way, each input interface corresponds to a first ACL table entry, so that the forwarding plane forwards or discards the message based on each first ACL table entry, that is, the message processing method provided by the present application is executed.

[0052] Similarly, the second ACL table entry may be generated according to the following method: the second ACL table entry is generated according to the above SAVA-P table entry, and the execution action in the above second ACL table entry is discard.

[0053] Specifically, in the control plane, the first network device may be connected to multiple second network devices. In order to avoid the accidental discarding of legitimate traffic, this embodiment can provide a gray list item, which is a collection of all SAVA-P items, that is, the SAVA-P items generated based on each second network device constitute a gray list SAVA-P item, and then generate a second ACL item based on the gray list SAVA-P item. Since the message hitting the second ACL item needs to be discarded, the execution action in the second ACL item is configured as discard. In addition, the second ACL item can be understood as a global ACL item. In order to implement the message processing flow of the present application, the second ACL item can be sent to the forwarding plane to execute the message processing method of the present application based on the second ACL item.

[0054] That is to say, the first ACL table item of each inbound interface stores the source prefix information that flows through the inbound interface and has been verified for legitimacy; and the second ACL table item includes legal and illegal source prefix information. If the source prefix information of the message is not in the first ACL table item, but in the second ACL table item, it indicates that the source prefix information of the message is illegal, and only such messages will be discarded. If the source prefix information of the message is neither in the first ACL table item nor in the second ACL table item, it indicates that the message is legal traffic outside the domain. In this case, forwarding processing is performed on the message, thereby avoiding the situation where legal traffic outside the domain is mistakenly discarded.

[0055] In addition, the present application is to avoid the situation where the message is mistakenly discarded under the premise of checking the legitimacy of the source address. Therefore, the second ACL table item includes the source prefix information used for the legitimacy check to meet the demand. Therefore, there is no need to write too much matching information, thereby greatly saving storage resources.

[0056] It is worth noting that the first ACL table item and the second ACL table item are dynamically updated, that is, the first network device can periodically collect routing information from each second network device, and then generate a SAVA-P table item based on the collected routing information, and then obtain the second ACL table item and the first ACL table item of each input interface according to the aforementioned method.

[0057] Optionally, the first network device is directly connected to at least one second network device, and both the first network device and the second network device use the SAVA-P function. The first ACL table item corresponding to each of the above-mentioned input interfaces may also include a VPN identifier of the VPN instance bound to the input interface of the second network device. On this basis, step S202 may be performed according to the following process: parsing the source address and VPN identifier from the IPv6 message; determining whether the correspondence between the parsed source address, VPN identifier, and the input interface identifier of the input interface of the IPv6 message is in the first ACL table item corresponding to the input interface; if so, confirming that the source address matches the first ACL table item; otherwise, confirming that the source address does not match the first ACL table item.

[0058] Specifically, the access network accessed to the second network device may be a virtual private network (VPN). At this time, in order to achieve the isolation of data of different access networks, each piece of routing information collected by the second network device will include the source address message and the VPN identifier of the VPN instance bound to the inbound interface of the second network device. Then, the first ACL table item of each inbound interface finally obtained by the first network device based on the routing information will include the corresponding relationship between the VPN identifier, the interface identifier of the inbound interface, and the source prefix information. On this basis, after the first network device receives the IPv6 message, in addition to the source address that can be resolved, the VPN identifier can also be resolved. Then, based on the source prefix information of the source address, the resolved VPN identifier, and the interface identifier of the inbound interface of the IPv6 message entering the first network device, a corresponding relationship to be matched is formed, which is recorded as the first corresponding relationship. Then, it is determined whether the first corresponding relationship is in the first ACL table item corresponding to the inbound interface. When it is in the first ACL table item, it indicates that the source address of the IPv6 message matches the first ACL table item, otherwise, the source address of the IPv6 message does not match the first ACL table item.

[0059] Similarly, the above-mentioned second ACL may also include a VPN identifier of a VPN instance bound to an input interface of a second network device that communicates with the first network device; then step S204 may be performed according to the following process: parsing the source address and the VPN identifier from the IPv6 message; determining whether the correspondence between the parsed source address and the VPN identifier is in the second ACL table entry; if so, confirming that the source address matches the second ACL table entry; if not, confirming that the source address does not match the second ACL table entry.

[0060] Specifically, when the access network connected to the second network device is a VPN, the routing information collected by the second network device will include the VPN identifier of the VPN to achieve isolation of data from different access networks, so that when generating the second ACL table item, in addition to writing the source prefix information in the second ACL table item, the VPN identifier of the VPN to which the source address corresponding to the source prefix information belongs can also be written, thereby uniquely identifying a user in an access network. In this way, when the first network device receives the IPv6 message, in addition to being able to resolve the source address, the VPN identifier can also be resolved, and then a corresponding relationship is formed based on the source prefix information of the source address and the resolved VPN identifier, which is recorded as a second corresponding relationship, and then it is determined whether the second corresponding relationship is in the second ACL table item. If so, it is confirmed that the source address of the IPv6 message matches the second ACL table item; if not, it is confirmed that the source address of the IPv6 message does not match the second ACL table item.

[0061] In order to better understand this embodiment, Figure 1 The application scenario shown is used as an example to illustrate. Figure 1The first network device is device G, and the second network device can be, but is not limited to, device E, device F, device A, etc. Take device E as the second network device for illustration, device E will collect the routing information of the user-side access network P3, and then send the collected routing information of the P3 access network to device G through the TCP protocol. Device G can generate SAVA-P items based on the received routing information on the control plane, and then generate interface-level items and graylist SAVA-P items, and then generate corresponding first ACL items for each input interface of the first network device based on the interface-level items, and send the ACL items to the input interface of the forwarding plane; at the same time, generate second ACL items based on the graylist SAVA-P items, and then send the second ACL items to the forwarding plane. On this basis, when device G receives the IPv6 message sent by device E, it can parse the source address from the IPv6 message, and then confirm the source prefix information corresponding to the source address, confirm that the IPv6 message enters the input interface of device G, and then query the first ACL table item based on the source prefix information and the interface identifier of the input interface. When it matches the first ACL table item, it indicates that the IPv6 message is sent by a user device with a legally verified source address in access network P3. For example, if the IPv6 message from access network P3 to device B via device E and device G reaches device B, the IPv6 message can be forwarded normally. When it does not match the first ACL table item, the source prefix information of the source address is queried for the second ACL table item. When it matches the second ACL table item, it may be an illegal message forged by an illegal attack on access network P3 to access device G. Based on this, the present application proposes to discard the IPv6 message, that is, discard the IPv6 message that does not match the first ACL table item but matches the second ACL table item. When the IPv6 message does not match the first ACL entry and the second ACL entry, it indicates that the IPv6 message may be extra-domain traffic, such as a legitimate message sent from device F to device G via device E (an IPv6 message from extra-domain X to device B via device F-device E-device G). In this case, the IPv6 message can be forwarded normally, thereby solving the problem of mistaken message discarding after performing a validity check on the source address.

[0062] In addition, the present application enriches the security technical means of IPv6 and solves the problem of spoofed IPv6 source address attacks from the source. In addition, the message processing method provided by the present application is to send the first ACL table item and the second ACL table item to the forwarding chip that supports the ACL function. The forwarding chip that supports the ACL function naturally supports the SAVA-P function. The forwarding chip does not need to perceive the SAVA-P configuration, which simplifies the forwarding chip processing while facilitating the promotion and application of SAVA-P services.

[0063] Based on the same inventive concept, the present application also provides a message processing device corresponding to the above message processing method. The implementation of the message processing device can refer to the above description of the message processing method, which will not be discussed here one by one.

[0064] See also Figure 3 , Figure 3 A message processing device provided by an exemplary embodiment of the present application is provided in a first network device with a SAVA-P function enabled, and the device includes:

[0065] Receiving module 301, used for receiving IPv6 message;

[0066] A first query module 302 is used to query a first ACL table item corresponding to the inbound interface of the IPv6 message according to the source address of the IPv6 message, wherein the first ACL table item includes a correspondence between an interface identifier of the inbound interface and source prefix information of the message allowed to be released by the inbound interface;

[0067] A forwarding module 303, configured to forward the IPv6 packet if the query result of the first query module 302 is that the source address matches the first ACL entry;

[0068] A second query module 304 is configured to query a second ACL entry according to the source address of the IPv6 message if the query result of the first query module 302 is that the source address does not match the first ACL entry, wherein the second ACL entry includes source prefix information of the historical record;

[0069] The forwarding module 303 is further configured to forward the IPv6 message if the query result of the second query module 304 is that the source address does not match the second ACL entry;

[0070] The discarding module 305 is configured to discard the IPv6 packet if the query result of the second query module 304 is that the source address matches the second ACL entry.

[0071] Optionally, based on the above embodiment, the message processing device provided in this embodiment may further include:

[0072] A first generating module (not shown in the figure) is used to generate a first ACL table item corresponding to each input interface according to the following method: receiving the user-side routing information collected by the second network device and reported by each second network device; generating a SAVA-P table item according to the routing information and the input interface of the routing information, wherein the SAVA-P table item includes the interface identifier of the input interface and the source prefix information of the source address in the routing information; generating a first ACL table item of the input interface according to the SAVA-P table item, wherein the execution action in the first ACL table item is release.

[0073] Optionally, based on the above embodiment, the message processing device provided in this embodiment may further include:

[0074] A second generation module (not shown in the figure) is used to generate a second ACL table entry according to the following method: receiving user-side routing information collected by the second network device and reported by the second network device; generating a SAVA-P table entry based on the routing information and the input interface of the routing information, the SAVA-P table entry including source prefix information of the source address in the routing information; generating the second ACL table entry based on the SAVA-P table entry, the execution action in the second ACL table entry being discard.

[0075] On this basis, the above-mentioned second generation module (not shown in the figure) is specifically used to generate gray list SAVA-P entries according to the SAVA-P entries generated by each second network device; and generate the second ACL entries according to the gray list SAVA-P entries.

[0076] Optionally, based on any of the above embodiments, the first ACL table entry corresponding to each inbound interface in this embodiment further includes a VPN identifier of a VPN instance bound to an inbound interface of a second network device communicating with the first network device;

[0077] On this basis, the first query module 302 is specifically used to parse the source address and VPN identifier from the IPv6 message; determine whether the correspondence between the parsed source address, VPN identifier and the inbound interface identifier of the inbound interface of the IPv6 message is in the first ACL table item corresponding to the inbound interface; if so, confirm that the source address matches the first ACL table item; otherwise, confirm that the source address does not match the first ACL table item.

[0078] Optionally, based on any of the above embodiments, the second ACL table entry in this embodiment further includes a VPN identifier of a VPN instance bound to an inbound interface of a second network device that communicates with the first network device;

[0079] On this basis, the second query module 304 is specifically used to parse the source address and VPN identifier from the IPv6 message; determine whether the correspondence between the parsed source address and VPN identifier is in the second ACL table item; if so, confirm that the source address matches the second ACL table item; if not, confirm that the source address does not match the second ACL table item.

[0080] By providing the above-mentioned message processing device, the problem of mistakenly discarded messages is solved after the source address is verified for legitimacy. In addition, the present application enriches the security technical means of IPv6 and solves the problem of spoofed IPv6 source address attacks from the source. In addition, the message processing method provided by the present application is to send the first ACL table item and the second ACL table item to the forwarding chip that supports the ACL function, and the forwarding chip that supports the ACL function naturally supports the SAVA-P function. The forwarding chip does not need to perceive the SAVA-P configuration, which simplifies the forwarding chip processing and facilitates the promotion and application of the SAVA-P service.

[0081] Based on the same inventive concept, an embodiment of the present application provides a network device, which may be but is not limited to the first network device mentioned above, such as Figure 4 As shown, the network device includes a processor 401 and a machine-readable storage medium 402, wherein the machine-readable storage medium 402 stores a computer program that can be executed by the processor 401, and the processor 401 is prompted by the computer program to execute the message processing method provided by any embodiment of the present application. In addition, the network device also includes a communication interface 403 and a communication bus 404, wherein the processor 401, the communication interface 403, and the machine-readable storage medium 402 communicate with each other through the communication bus 404.

[0082] The communication bus mentioned in the above network device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0083] The communication interface is used for communication between the above network devices and other devices.

[0084] The machine-readable storage medium 402 may be a memory, which may include a random access memory (RAM), a DDR SRAM (Double Data Rate Synchronous Dynamic Random Access Memory), or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the processor.

[0085] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0086] As for the network device and machine-readable storage medium embodiments, since the method contents involved are basically similar to the aforementioned method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0087] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0088] The implementation process of the functions and effects of each unit / module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.

[0089] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are merely schematic, wherein the units / modules described as separate components may or may not be physically separated, and the components displayed as units / modules may or may not be physical units / modules, that is, they may be located in one place, or they may be distributed on multiple network units / modules. Some or all of the units / modules may be selected according to actual needs to achieve the purpose of the present application. A person of ordinary skill in the art can understand and implement it without creative work.

[0090] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A message processing method, characterized in that: Applied to a first network device enabling a SAVA-P function, the method includes: Receive IPv6 packets; According to the source address of the IPv6 message, query the first ACL table entry corresponding to the inbound interface of the IPv6 message; If the source address matches the first ACL entry, forwarding the IPv6 message; If the source address does not match the first ACL entry, querying a second ACL entry according to the source address of the IPv6 message; If the source address does not match the second ACL entry, forwarding the IPv6 message; If the source address matches the second ACL entry, discarding the IPv6 message; The first ACL entry corresponding to each inbound interface is generated in the following way: Receiving the user-side routing information collected by each second network device and reported by the second network device; Generate a SAVA-P table entry according to the routing information and the inbound interface of the routing information, wherein the SAVA-P table entry includes an interface identifier of the inbound interface and source prefix information of a source address in the routing information; Generate a first ACL entry for the inbound interface according to the SAVA-P entry, wherein the execution action in the first ACL entry is release; The second ACL entry is generated according to the following method: Receiving user-side routing information collected by the second network device and reported by the second network device; Generate a SAVA-P table entry according to the routing information and the inbound interface of the routing information, wherein the SAVA-P table entry includes source prefix information corresponding to the source address in the routing information; The second ACL entry is generated according to the SAVA-P entry, and the execution action in the second ACL entry is discard.

2. The method according to claim 1, characterized in that Generating the second ACL entry according to the SAVA-P entry includes: Generate a grey list SAVA-P entry according to the SAVA-P entry generated by each second network device; The second ACL entry is generated according to the grey list SAVA-P entry.

3. The method according to claim 1, characterized in that The first ACL table entry corresponding to each inbound interface further includes a VPN identifier of a VPN instance bound to an inbound interface of a second network device communicating with the first network device; Querying, according to the source address of the IPv6 message, a first ACL entry corresponding to the inbound interface of the IPv6 message, including: Parsing the source address and VPN identifier from the IPv6 message; Determine whether the correspondence between the parsed source address, the VPN identifier, and the inbound interface identifier of the inbound interface of the IPv6 message is in the first ACL table entry corresponding to the inbound interface; If yes, confirming that the source address matches the first ACL entry; Otherwise, it is determined that the source address does not match the first ACL entry.

4. The method according to claim 1, characterized in that: The second ACL table entry further includes a VPN identifier of a VPN instance bound to an inbound interface of a second network device communicating with the first network device; Querying a second ACL entry according to the source address of the IPv6 message includes: Parsing the source address and VPN identifier from the IPv6 message; Determine whether the correspondence between the parsed source address and the VPN identifier is in the second ACL table entry; If yes, confirming that the source address matches the second ACL entry; If not, it is confirmed that the source address does not match the second ACL entry.

5. A message processing device, characterized in that: The device is configured in a first network device that enables a SAVA-P function, and includes: A receiving module, used for receiving IPv6 packets; A first query module, used to query a first ACL entry corresponding to an inbound interface of the IPv6 message according to a source address of the IPv6 message; a forwarding module, configured to forward the IPv6 message if the query result of the first query module is that the source address matches the first ACL entry; a second query module, configured to query a second ACL entry according to the source address of the IPv6 message if the query result of the first query module is that the source address does not match the first ACL entry; The forwarding module is further configured to forward the IPv6 message if the query result of the second query module is that the source address does not match the second ACL entry; a discarding module, configured to discard the IPv6 packet if the query result of the second query module is that the source address matches the second ACL entry; The first generating module is used to generate a first ACL table item corresponding to each input interface according to the following method: receiving the user-side routing information collected by the second network device and reported by each second network device; generating a SAVA-P table item according to the routing information and the input interface of the routing information, wherein the SAVA-P table item includes the interface identifier of the input interface and the source prefix information of the source address in the routing information; generating a first ACL table item of the input interface according to the SAVA-P table item, wherein the execution action in the first ACL table item is release; The second generation module is used to generate a second ACL table item according to the following method: receiving the user-side routing information collected by the second network device and reported by the second network device; generating a SAVA-P table item according to the routing information and the input interface of the routing information, wherein the SAVA-P table item includes the source prefix information of the source address in the routing information; generating the second ACL table item according to the SAVA-P table item, wherein the execution action in the second ACL table item is discard.

6. The device according to claim 5, characterized in that The second generating module is specifically configured to generate a grey list SAVA-P entry according to the SAVA-P entry generated by each second network device; and generate the second ACL entry according to the grey list SAVA-P entry.

7. The device according to claim 5, characterized in that The first ACL table entry corresponding to each inbound interface further includes a VPN identifier of a VPN instance bound to an inbound interface of a second network device communicating with the first network device; The first query module is specifically used to parse the source address and VPN identifier from the IPv6 message; determine whether the correspondence between the parsed source address, VPN identifier and the incoming interface identifier of the incoming interface of the IPv6 message is in the first ACL table item corresponding to the incoming interface; If so, it is confirmed that the source address matches the first ACL entry; otherwise, it is confirmed that the source address does not match the first ACL entry.

8. The device according to claim 5, characterized in that The second ACL table entry further includes a VPN identifier of a VPN instance bound to an inbound interface of a second network device communicating with the first network device; The second query module is specifically used to parse the source address and VPN identifier from the IPv6 message; determine whether the corresponding relationship between the parsed source address and VPN identifier is in the second ACL table item; If yes, confirming that the source address matches the second ACL entry; If not, it is confirmed that the source address does not match the second ACL entry.