diff options
author | Abhinay Ramesh <rabhinay@vmware.com> | 2021-05-30 18:33:41 +0200 |
---|---|---|
committer | Abhinay Ramesh <rabhinay@vmware.com> | 2022-02-09 02:57:08 +0100 |
commit | 6cb85350df7fdcea106947fdda42a91ddebcdd5e (patch) | |
tree | 9b995fe10714480472ba3c4b842ce32d9f6e1fc2 /ospf6d/ospf6_auth_trailer.h | |
parent | ospf6d: Core functionality of auth trailer implementation.. (diff) | |
download | frr-6cb85350df7fdcea106947fdda42a91ddebcdd5e.tar.xz frr-6cb85350df7fdcea106947fdda42a91ddebcdd5e.zip |
ospf6d: Stitching the auth trailer code with rest of ospf6.
Problem Statement:
==================
RFC 7166 support for OSPF6 in FRR code.
RCA:
====
This feature is newly supported in FRR
Fix:
====
Core functionality implemented in previous commit is
stitched with rest of ospf6 code as part of this commit.
Risk:
=====
Low risk
Tests Executed:
===============
Have executed the combination of commands.
Signed-off-by: Abhinay Ramesh <rabhinay@vmware.com>
Diffstat (limited to 'ospf6d/ospf6_auth_trailer.h')
-rw-r--r-- | ospf6d/ospf6_auth_trailer.h | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/ospf6d/ospf6_auth_trailer.h b/ospf6d/ospf6_auth_trailer.h index fa2de28ef..86ec49beb 100644 --- a/ospf6d/ospf6_auth_trailer.h +++ b/ospf6d/ospf6_auth_trailer.h @@ -27,12 +27,12 @@ #define OSPF6_AUTH_HDR_MIN_SIZE 16 #define OSPF6_AUTH_HDR_FULL KEYCHAIN_MAX_HASH_SIZE + OSPF6_AUTH_HDR_MIN_SIZE -#define OSPF6_AUTHENTICATION_NULL 0 -#define OSPF6_AUTHENTICATION_CRYPTOGRAPHIC 1 -static const uint16_t CPID = 1; +#define OSPF6_AUTHENTICATION_NULL 0 +#define OSPF6_AUTHENTICATION_CRYPTOGRAPHIC 1 /* Auth debug options */ extern unsigned char conf_debug_ospf6_auth[2]; + #define OSPF6_AUTH_TX 0 #define OSPF6_AUTH_RX 1 #define OSPF6_DEBUG_AUTH_TX_ON() (conf_debug_ospf6_auth[OSPF6_AUTH_TX] = 1) @@ -57,24 +57,37 @@ struct ospf6_auth_hdr { unsigned char data[KEYCHAIN_MAX_HASH_SIZE]; }; +enum ospf6_auth_err { + OSPF6_AUTH_VALIDATE_SUCCESS = 0, + OSPF6_AUTH_VALIDATE_FAILURE, + OSPF6_AUTH_PROCESS_NORMAL, + OSPF6_AUTH_FILE_EXIST, + OSPF6_AUTH_FILE_DO_NOT_EXIST +}; + void ospf6_auth_hdr_dump_send(struct ospf6_header *ospfh, uint16_t length); -void ospf6_auth_hdr_dump_recv(struct ospf6_header *ospfh, uint16_t length); +void ospf6_auth_hdr_dump_recv(struct ospf6_header *ospfh, uint16_t length, + unsigned int lls_len); unsigned char *ospf6_hash_message_xor(unsigned char *mes1, unsigned char *mes2, uint32_t len); unsigned int ospf6_auth_len_get(struct ospf6_interface *oi); int ospf6_auth_validate_pkt(struct ospf6_interface *oi, unsigned int *pkt_len, - struct ospf6_header *oh, unsigned int *at_len); + struct ospf6_header *oh, unsigned int *at_len, + unsigned int *lls_block_len); int ospf6_auth_check_digest(struct ospf6_header *oh, struct ospf6_interface *oi, - struct in6_addr *src); + struct in6_addr *src, unsigned int lls_len); void ospf6_auth_update_digest(struct ospf6_interface *oi, struct ospf6_header *oh, struct ospf6_auth_hdr *ospf6_auth, char *auth_str, - uint16_t auth_len, uint32_t pkt_len, - enum keychain_hash_algo algo); + uint32_t pkt_len, enum keychain_hash_algo algo); void ospf6_auth_digest_send(struct in6_addr *src, struct ospf6_interface *oi, struct ospf6_header *oh, uint16_t auth_len, uint32_t pkt_len); void install_element_ospf6_debug_auth(void); int config_write_ospf6_debug_auth(struct vty *vty); void install_element_ospf6_clear_intf_auth(void); +enum ospf6_auth_err ospf6_auth_nvm_file_exist(void); +void ospf6_auth_seqno_nvm_update(struct ospf6 *ospf6); +void ospf6_auth_seqno_nvm_delete(struct ospf6 *ospf6); +void ospf6_auth_seqno_nvm_read(struct ospf6 *ospf6); #endif /* __OSPF6_AUTH_TRAILER_H__ */ |