-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add SONiC WPA_SUPPLICANT Plugin #16
Conversation
Signed-off-by: Ze Gan <ganze718@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me.
src/drivers/driver_macsec_sonic.c
Outdated
struct driver_wired_common_data common; | ||
|
||
const char * ifname; | ||
sonic_db_handle sonic_mamager; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sonic_mamager -->> sonic_manager (spell check)
src/drivers/driver_macsec_sonic.c
Outdated
PRINT_LOG("SA %s PN %llu", key, pn); | ||
if (ret == SONIC_DB_SUCCESS) | ||
{ | ||
sa->next_pn = pn; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sa->next_pn
should be
sa->lowest_pn
src/drivers/driver_macsec_sonic.c
Outdated
|
||
char * key = CREATE_SA_KEY(drv->ifname, sa, APP_DB_SEPARATOR); | ||
PRINT_LOG("%s - %u", key, sa->next_pn); | ||
char * buffer = create_buffer("%u", sa->next_pn); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sa->next_pn
should be
sa->lowest_pn
src/drivers/driver_macsec_sonic.c
Outdated
char * key = CREATE_SA_KEY(drv->ifname, sa, APP_DB_SEPARATOR); | ||
char * sak_id = create_binary_hex(&sa->pkey->key_identifier, sizeof(sa->pkey->key_identifier)); | ||
char * sak = create_binary_hex(sa->pkey->key, sa->pkey->key_len); | ||
char * pn = create_buffer("%u", sa->next_pn); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sa->next_pn
should be
sa->lowest_pn
Similar changes below in the function.
src/drivers/driver_macsec_sonic.c
Outdated
{ | ||
{"sak", sak}, | ||
{"auth_key", auth_key}, | ||
{"init_pn", pn}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
init_pn --> this is actually next pn. You can change the name for clarity sake.
17af119
to
7b22e02
Compare
b3a7502
to
e92ea79
Compare
ec894d6
to
37e9be6
Compare
Signed-off-by: Ze Gan <ganze718@gmail.com>
e92ea79
to
9f87f3d
Compare
Signed-off-by: Ze Gan <ganze718@gmail.com>
This PR will be closed and moved to #22 . Because the original version is based on branch |
@caizhenghui-juniper @samitabh |
SONiC WPA_SUPPLICANT Plugin document can be found at : https://github.com/Azure/SONiC/blob/9edcf67d0e0095e9f831a94ddf4fbb4a267adf7b/doc/macsec/MACsec_hld.md#343-sonic-macsec-plugin
This PR depends on #18
Signed-off-by: Ze Gan ganze718@gmail.com