mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-13 22:57:45 +00:00
Merge pull request #12568 from YutaroHayakawa/YutaroHayakawa/fpm-nexthop
fpm: Send NH message to FPM even if the local kernel doesn't support it
This commit is contained in:
commit
b15826e81b
@ -863,7 +863,7 @@ static int fpm_nl_enqueue(struct fpm_nl_ctx *fnc, struct zebra_dplane_ctx *ctx)
|
||||
|
||||
case DPLANE_OP_NH_DELETE:
|
||||
rv = netlink_nexthop_msg_encode(RTM_DELNEXTHOP, ctx, nl_buf,
|
||||
sizeof(nl_buf));
|
||||
sizeof(nl_buf), true);
|
||||
if (rv <= 0) {
|
||||
zlog_err("%s: netlink_nexthop_msg_encode failed",
|
||||
__func__);
|
||||
@ -875,7 +875,7 @@ static int fpm_nl_enqueue(struct fpm_nl_ctx *fnc, struct zebra_dplane_ctx *ctx)
|
||||
case DPLANE_OP_NH_INSTALL:
|
||||
case DPLANE_OP_NH_UPDATE:
|
||||
rv = netlink_nexthop_msg_encode(RTM_NEWNEXTHOP, ctx, nl_buf,
|
||||
sizeof(nl_buf));
|
||||
sizeof(nl_buf), true);
|
||||
if (rv <= 0) {
|
||||
zlog_err("%s: netlink_nexthop_msg_encode failed",
|
||||
__func__);
|
||||
|
@ -2501,7 +2501,7 @@ static bool _netlink_nexthop_build_group(struct nlmsghdr *n, size_t req_size,
|
||||
*/
|
||||
ssize_t netlink_nexthop_msg_encode(uint16_t cmd,
|
||||
const struct zebra_dplane_ctx *ctx,
|
||||
void *buf, size_t buflen)
|
||||
void *buf, size_t buflen, bool fpm)
|
||||
{
|
||||
struct {
|
||||
struct nlmsghdr n;
|
||||
@ -2528,9 +2528,10 @@ ssize_t netlink_nexthop_msg_encode(uint16_t cmd,
|
||||
|
||||
/*
|
||||
* Nothing to do if the kernel doesn't support nexthop objects or
|
||||
* we dont want to install this type of NHG
|
||||
* we dont want to install this type of NHG, but FPM may possible to
|
||||
* handle this.
|
||||
*/
|
||||
if (!kernel_nexthops_supported()) {
|
||||
if (!fpm && !kernel_nexthops_supported()) {
|
||||
if (IS_ZEBRA_DEBUG_KERNEL || IS_ZEBRA_DEBUG_NHG)
|
||||
zlog_debug(
|
||||
"%s: nhg_id %u (%s): kernel nexthops not supported, ignoring",
|
||||
@ -2850,7 +2851,7 @@ static ssize_t netlink_nexthop_msg_encoder(struct zebra_dplane_ctx *ctx,
|
||||
return -1;
|
||||
}
|
||||
|
||||
return netlink_nexthop_msg_encode(cmd, ctx, buf, buflen);
|
||||
return netlink_nexthop_msg_encode(cmd, ctx, buf, buflen, false);
|
||||
}
|
||||
|
||||
enum netlink_msg_status
|
||||
|
@ -84,7 +84,7 @@ extern int netlink_nexthop_change(struct nlmsghdr *h, ns_id_t ns_id,
|
||||
extern int netlink_nexthop_read(struct zebra_ns *zns);
|
||||
extern ssize_t netlink_nexthop_msg_encode(uint16_t cmd,
|
||||
const struct zebra_dplane_ctx *ctx,
|
||||
void *buf, size_t buflen);
|
||||
void *buf, size_t buflen, bool fpm);
|
||||
|
||||
extern ssize_t netlink_lsp_msg_encoder(struct zebra_dplane_ctx *ctx, void *buf,
|
||||
size_t buflen);
|
||||
|
Loading…
Reference in New Issue
Block a user