mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 01:40:16 +00:00
Merge pull request #12230 from cscarpitta/fix/replace-inet-top-in-srv6-lib
lib: Use `%pI6`/`%pI4` to print SRv6 seg6local ctx
This commit is contained in:
commit
6863cf6a5a
@ -85,8 +85,6 @@ const char *seg6local_context2str(char *str, size_t size,
|
|||||||
const struct seg6local_context *ctx,
|
const struct seg6local_context *ctx,
|
||||||
uint32_t action)
|
uint32_t action)
|
||||||
{
|
{
|
||||||
char b0[128];
|
|
||||||
|
|
||||||
switch (action) {
|
switch (action) {
|
||||||
|
|
||||||
case ZEBRA_SEG6_LOCAL_ACTION_END:
|
case ZEBRA_SEG6_LOCAL_ACTION_END:
|
||||||
@ -95,13 +93,11 @@ const char *seg6local_context2str(char *str, size_t size,
|
|||||||
|
|
||||||
case ZEBRA_SEG6_LOCAL_ACTION_END_X:
|
case ZEBRA_SEG6_LOCAL_ACTION_END_X:
|
||||||
case ZEBRA_SEG6_LOCAL_ACTION_END_DX6:
|
case ZEBRA_SEG6_LOCAL_ACTION_END_DX6:
|
||||||
inet_ntop(AF_INET6, &ctx->nh6, b0, 128);
|
snprintfrr(str, size, "nh6 %pI6", &ctx->nh6);
|
||||||
snprintf(str, size, "nh6 %s", b0);
|
|
||||||
return str;
|
return str;
|
||||||
|
|
||||||
case ZEBRA_SEG6_LOCAL_ACTION_END_DX4:
|
case ZEBRA_SEG6_LOCAL_ACTION_END_DX4:
|
||||||
inet_ntop(AF_INET, &ctx->nh4, b0, 128);
|
snprintfrr(str, size, "nh4 %pI4", &ctx->nh4);
|
||||||
snprintf(str, size, "nh4 %s", b0);
|
|
||||||
return str;
|
return str;
|
||||||
|
|
||||||
case ZEBRA_SEG6_LOCAL_ACTION_END_T:
|
case ZEBRA_SEG6_LOCAL_ACTION_END_T:
|
||||||
|
Loading…
Reference in New Issue
Block a user