A packet processing method, wherein the method comprises: receiving, by a network device, a first link state protocol data unit, LSP, packet; determining, by the network device, whether the network device has stored an LSP packet whose link state protocol data unit identity, LSP ID, is the same as an LSP ID of the first LSP packet and whose protocol data unit, PDU, type is the same as a PDU type of the first LSP packet; when the network device determines that the network device stores no LSP packet whose LSP ID is the same as the LSP ID of the first LSP packet and whose PDU type is the same as the PDU type of the first LSP packet, or when the network device determines that the network device has stored a second LSP packet, wherein an LSP ID of the second LSP packet is the same as the LSP ID of the first LSP packet, a PDU type of the second LSP packet is the same as the PDU type of the first LSP packet, and a sequence number of the second LSP packet is less than a sequence number of the first LSP packet, or when the network device determines that the network device has stored a third LSP packet, wherein an LSP ID of the third LSP packet is the same as the LSP ID of the first LSP packet, a PDU type of the third LSP packet is the same as the PDU type of the first LSP packet, a sequence number of the third LSP packet is the same as a sequence number of the first LSP packet, and a checksum of the third LSP packet is less than a checksum of the first LSP packet, determining, by the network device, there is LSP packet digest information matching the first LSP packet in an LSP packet digest information set that has been stored in the network device, wherein the LSP packet digest information set comprises LSP packet digest information of one or more LSP packets that have been deleted by the network device, and the LSP packet digest information in the LSP packet digest information set comprises an LSP ID, a PDU type, a sequence number, and a checksum; and after the network device determining that there is LSP packet digest information matching the first LSP packet in the LSP packet digest information set, storing, by the network device, the first LSP packet, wherein a remaining lifetime of the first LSP packet is not modified to MaxAge. receiving, by a network device, a first link state protocol data unit, LSP, packet; determining, by the network device, whether the network device has stored an LSP packet whose link state protocol data unit identity, LSP ID, is the same as an LSP ID of the first LSP packet and whose protocol data unit, PDU, type is the same as a PDU type of the first LSP packet; when the network device determines that the network device stores no LSP packet whose LSP ID is the same as the LSP ID of the first LSP packet and whose PDU type is the same as the PDU type of the first LSP packet, or when the network device determines that the network device has stored a second LSP packet, wherein an LSP ID of the second LSP packet is the same as the LSP ID of the first LSP packet, a PDU type of the second LSP packet is the same as the PDU type of the first LSP packet, and a sequence number of the second LSP packet is less than a sequence number of the first LSP packet, or when the network device determines that the network device has stored a third LSP packet, wherein an LSP ID of the third LSP packet is the same as the LSP ID of the first LSP packet, a PDU type of the third LSP packet is the same as the PDU type of the first LSP packet, a sequence number of the third LSP packet is the same as a sequence number of the first LSP packet, and a checksum of the third LSP packet is less than a checksum of the first LSP packet, determining, by the network device, there is LSP packet digest information matching the first LSP packet in an LSP packet digest information set that has been stored in the network device, wherein the LSP packet digest information set comprises LSP packet digest information of one or more LSP packets that have been deleted by the network device, and the LSP packet digest information in the LSP packet digest information set comprises an LSP ID, a PDU type, a sequence number, and a checksum; and after the network device determining that there is LSP packet digest information matching the first LSP packet in the LSP packet digest information set, storing, by the network device, the first LSP packet, wherein a remaining lifetime of the first LSP packet is not modified to MaxAge.