Skip to content
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

Closed
wants to merge 3 commits into from

Conversation

Pterosaur
Copy link
Collaborator

@Pterosaur Pterosaur commented Nov 3, 2020

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

Signed-off-by: Ze Gan <ganze718@gmail.com>
Copy link

@caizhenghui-juniper caizhenghui-juniper left a 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.

@Pterosaur Pterosaur changed the base branch from wpa/hostap_2_9 to master November 24, 2020 03:37
@Pterosaur Pterosaur marked this pull request as draft November 24, 2020 03:48
struct driver_wired_common_data common;

const char * ifname;
sonic_db_handle sonic_mamager;

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)

PRINT_LOG("SA %s PN %llu", key, pn);
if (ret == SONIC_DB_SUCCESS)
{
sa->next_pn = pn;

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


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);

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

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);

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.

{
{"sak", sak},
{"auth_key", auth_key},
{"init_pn", pn},

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.

@Pterosaur Pterosaur force-pushed the master branch 2 times, most recently from 17af119 to 7b22e02 Compare November 26, 2020 16:19
@Pterosaur Pterosaur force-pushed the master branch 3 times, most recently from ec894d6 to 37e9be6 Compare November 26, 2020 18:02
Signed-off-by: Ze Gan <ganze718@gmail.com>
Signed-off-by: Ze Gan <ganze718@gmail.com>
@Pterosaur
Copy link
Collaborator Author

This PR will be closed and moved to #22 . Because the original version is based on branch wpa/hostap_2_9.

@Pterosaur Pterosaur closed this Nov 27, 2020
@Pterosaur
Copy link
Collaborator Author

@caizhenghui-juniper @samitabh
Dear partners, If you have more comments, please move to the new PR: #22
Thanks for your understanding。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants