-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
ospfd: Displaying GR helper enabled router-id list in 'show ip ospf g… #9317
Conversation
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.
Thanks for your contribution to FRR!
sprintf, strcat, strcpy, inet_ntoa
are banned; please usesnprintf, strlcat, strlcpy, inet_ntop
Click for style suggestions
To apply these suggestions:
curl -s https://gist.githubusercontent.com/polychaeta/b62721966937b325f6c843e16e681306/raw/3bc6fccc1575860b5f4ee9b6e1320f8c52c1687b/cr_9317_1628271917.diff | git apply
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c
index 46dc174348..9e6f2f886e 100644
--- a/ospfd/ospf_vty.c
+++ b/ospfd/ospf_vty.c
@@ -10132,7 +10132,7 @@ static int ospf_print_vty_helper_dis_rtr_walkcb(struct hash_bucket *bucket,
}
static int ospf_print_json_helper_dis_rtr_walkcb(struct hash_bucket *bucket,
- void *arg)
+ void *arg)
{
struct advRtr *rtr = bucket->data;
struct json_object *json_rid_array = (struct json_object *)arg;
@@ -10141,7 +10141,7 @@ static int ospf_print_json_helper_dis_rtr_walkcb(struct hash_bucket *bucket,
json_rid = json_object_new_object();
json_object_string_add(json_rid, "routerId",
- inet_ntoa(rtr->advRtrAddr));
+ inet_ntoa(rtr->advRtrAddr));
json_object_array_add(json_rid_array, json_rid);
return HASHWALK_CONTINUE;
@@ -10271,11 +10271,11 @@ static int ospf_show_gr_helper_details(struct vty *vty, struct ospf *ospf,
json_object_new_array();
json_object_object_add(json_vrf, "enabledRouterIds",
- json_rid_array);
+ json_rid_array);
hash_walk(ospf->enable_rtr_list,
- ospf_print_json_helper_dis_rtr_walkcb,
- json_rid_array);
+ ospf_print_json_helper_dis_rtr_walkcb,
+ json_rid_array);
}
}
If you are a new contributor to FRR, please see our contributing guidelines.
After making changes, you do not need to create a new PR. You should perform an amend or interactive rebase followed by a force push.
Outdated results 💚Basic BGPD CI results: SUCCESS, 0 tests failed
For details, please contact louberger |
Continuous Integration Result: SUCCESSFULContinuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-20845/ This is a comment from an automated CI system. |
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.
Thanks for your contribution to FRR!
sprintf, strcat, strcpy, inet_ntoa
are banned; please usesnprintf, strlcat, strlcpy, inet_ntop
Click for style suggestions
To apply these suggestions:
curl -s https://gist.githubusercontent.com/polychaeta/3dd438540a9ef7a2e5c60e631a4294bf/raw/3bc6fccc1575860b5f4ee9b6e1320f8c52c1687b/cr_9317_1628589775.diff | git apply
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c
index 46dc174348..9e6f2f886e 100644
--- a/ospfd/ospf_vty.c
+++ b/ospfd/ospf_vty.c
@@ -10132,7 +10132,7 @@ static int ospf_print_vty_helper_dis_rtr_walkcb(struct hash_bucket *bucket,
}
static int ospf_print_json_helper_dis_rtr_walkcb(struct hash_bucket *bucket,
- void *arg)
+ void *arg)
{
struct advRtr *rtr = bucket->data;
struct json_object *json_rid_array = (struct json_object *)arg;
@@ -10141,7 +10141,7 @@ static int ospf_print_json_helper_dis_rtr_walkcb(struct hash_bucket *bucket,
json_rid = json_object_new_object();
json_object_string_add(json_rid, "routerId",
- inet_ntoa(rtr->advRtrAddr));
+ inet_ntoa(rtr->advRtrAddr));
json_object_array_add(json_rid_array, json_rid);
return HASHWALK_CONTINUE;
@@ -10271,11 +10271,11 @@ static int ospf_show_gr_helper_details(struct vty *vty, struct ospf *ospf,
json_object_new_array();
json_object_object_add(json_vrf, "enabledRouterIds",
- json_rid_array);
+ json_rid_array);
hash_walk(ospf->enable_rtr_list,
- ospf_print_json_helper_dis_rtr_walkcb,
- json_rid_array);
+ ospf_print_json_helper_dis_rtr_walkcb,
+ json_rid_array);
}
}
If you are a new contributor to FRR, please see our contributing guidelines.
After making changes, you do not need to create a new PR. You should perform an amend or interactive rebase followed by a force push.
Continuous Integration Result: SUCCESSFULContinuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-20961/ This is a comment from an automated CI system. |
Outdated results 🚧Basic BGPD CI results: Partial FAILURE, autoscript-2021-08-10-20:15:52.log.bz2 tests failed, has VALGRIND issues
For details, please contact louberger |
Outdated results 💚Basic BGPD CI results: SUCCESS, 0 tests failed
For details, please contact louberger |
Outdated results 💚Basic BGPD CI results: SUCCESS, 0 tests failed
For details, please contact louberger |
Outdated results 💚Basic BGPD CI results: SUCCESS, 0 tests failed
For details, please contact louberger |
ospfd/ospf_vty.c
Outdated
struct json_object *json_rid_array = | ||
json_object_new_array(); | ||
|
||
json_object_object_add(json_vrf, "enabledRouterIds", |
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.
nit: grEnabledRouterIds would be better?
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.
Addressed the change.
ci: rerun |
ci:rerun |
Outdated results 💚Basic BGPD CI results: SUCCESS, 0 tests failed
For details, please contact louberger |
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedTopotests Ubuntu 18.04 i386 part 9: Failed (click for details)Topotests Ubuntu 18.04 i386 part 9: No useful log foundSuccessful on other platforms/tests
|
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedTopotests Ubuntu 18.04 i386 part 0: Failed (click for details)Topotests Ubuntu 18.04 i386 part 0: No useful log foundTopotests Ubuntu 18.04 i386 part 2: Failed (click for details)Topotests Ubuntu 18.04 i386 part 2: No useful log foundTopotests Ubuntu 18.04 amd64 part 3: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TP3U1804AMD64-815/test Topology Tests failed for Topotests Ubuntu 18.04 amd64 part 3:
see full log at https://ci1.netdef.org/browse/FRR-PULLREQ2-815/artifact/TP3U1804AMD64/ErrorLog/log_topotests.txt Successful on other platforms/tests
|
Continuous Integration Result: SUCCESSFULContinuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-814/ This is a comment from an automated CI system. |
345ac13
to
f67c4b6
Compare
Outdated results 💚Basic BGPD CI results: SUCCESS, 0 tests failed
For details, please contact louberger |
Outdated results 💚Basic BGPD CI results: SUCCESS, 0 tests failed
For details, please contact louberger |
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedTopotests debian 10 amd64 part 9: Failed (click for details)Topotests debian 10 amd64 part 9: No useful log foundSuccessful on other platforms/tests
|
Continuous Integration Result: SUCCESSFULContinuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-864/ This is a comment from an automated CI system. |
Continuous Integration Result: SUCCESSFULContinuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-2566/ This is a comment from an automated CI system. |
…r helper json' Description: GR helper enabled router-ids info is missing from json output of "show ip ospf gr helper json" command. Added the relevant json keys to add this info as part of this change. Signed-off-by: Rajesh Girada <rgirada@vmware.com>
Continuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-5828/ This is a comment from an automated CI system. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This is already addressed in this following PR |
…r helper json'
Description:
GR helper enabled router-ids info is missing from json output of
"show ip ospf gr helper json" command.
Added the relevant json keys to add this info as part of this change.
Signed-off-by: Rajesh Girada rgirada@vmware.com