mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-04-28 20:44:12 +00:00
zebra, lib: add support for SRv6 End.DT46 behavior
This commit enables zebra to install End.DT46 nexthops into the Linux kernel. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
This commit is contained in:
parent
f10b773c79
commit
8bea07e49f
@ -57,6 +57,8 @@ const char *seg6local_action2str(uint32_t action)
|
||||
return "End.AS";
|
||||
case ZEBRA_SEG6_LOCAL_ACTION_END_AM:
|
||||
return "End.AM";
|
||||
case ZEBRA_SEG6_LOCAL_ACTION_END_DT46:
|
||||
return "End.DT46";
|
||||
case ZEBRA_SEG6_LOCAL_ACTION_UNSPEC:
|
||||
return "unspec";
|
||||
default:
|
||||
@ -105,6 +107,7 @@ const char *seg6local_context2str(char *str, size_t size,
|
||||
case ZEBRA_SEG6_LOCAL_ACTION_END_T:
|
||||
case ZEBRA_SEG6_LOCAL_ACTION_END_DT6:
|
||||
case ZEBRA_SEG6_LOCAL_ACTION_END_DT4:
|
||||
case ZEBRA_SEG6_LOCAL_ACTION_END_DT46:
|
||||
snprintf(str, size, "table %u", ctx->table);
|
||||
return str;
|
||||
|
||||
|
@ -60,6 +60,7 @@ enum seg6local_action_t {
|
||||
ZEBRA_SEG6_LOCAL_ACTION_END_AS = 13,
|
||||
ZEBRA_SEG6_LOCAL_ACTION_END_AM = 14,
|
||||
ZEBRA_SEG6_LOCAL_ACTION_END_BPF = 15,
|
||||
ZEBRA_SEG6_LOCAL_ACTION_END_DT46 = 16,
|
||||
};
|
||||
|
||||
struct seg6_segs {
|
||||
|
@ -1540,6 +1540,16 @@ static bool _netlink_route_build_singlepath(const struct prefix *p,
|
||||
ctx->table))
|
||||
return false;
|
||||
break;
|
||||
case ZEBRA_SEG6_LOCAL_ACTION_END_DT46:
|
||||
if (!nl_attr_put32(nlmsg, req_size,
|
||||
SEG6_LOCAL_ACTION,
|
||||
SEG6_LOCAL_ACTION_END_DT46))
|
||||
return false;
|
||||
if (!nl_attr_put32(nlmsg, req_size,
|
||||
SEG6_LOCAL_VRFTABLE,
|
||||
ctx->table))
|
||||
return false;
|
||||
break;
|
||||
default:
|
||||
zlog_err("%s: unsupport seg6local behaviour action=%u",
|
||||
__func__,
|
||||
@ -2706,6 +2716,18 @@ ssize_t netlink_nexthop_msg_encode(uint16_t cmd,
|
||||
ctx->table))
|
||||
return 0;
|
||||
break;
|
||||
case SEG6_LOCAL_ACTION_END_DT46:
|
||||
if (!nl_attr_put32(
|
||||
&req->n, buflen,
|
||||
SEG6_LOCAL_ACTION,
|
||||
SEG6_LOCAL_ACTION_END_DT46))
|
||||
return 0;
|
||||
if (!nl_attr_put32(
|
||||
&req->n, buflen,
|
||||
SEG6_LOCAL_VRFTABLE,
|
||||
ctx->table))
|
||||
return 0;
|
||||
break;
|
||||
default:
|
||||
zlog_err("%s: unsupport seg6local behaviour action=%u",
|
||||
__func__, action);
|
||||
|
Loading…
Reference in New Issue
Block a user