mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 16:54:30 +00:00
Zebra: Address review comments for RMAC FPM feature 1
Address minor review comments. Signed-off-by: Ameya Dharkar <adharkar@vmware.com>
This commit is contained in:
parent
9da60d0a19
commit
c5431822de
@ -1030,7 +1030,7 @@ static int zfpm_build_route_updates(void)
|
|||||||
*/
|
*/
|
||||||
return FPM_GOTO_NEXT_Q;
|
return FPM_GOTO_NEXT_Q;
|
||||||
}
|
}
|
||||||
} while (1);
|
} while (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1623,8 +1623,7 @@ static int zfpm_trigger_rmac_update(zebra_mac_t *rmac, zebra_l3vni_t *zl3vni,
|
|||||||
if (!fpm_mac)
|
if (!fpm_mac)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
memcpy(&fpm_mac->zebra_flags, &rmac->flags, sizeof(uint32_t));
|
fpm_mac->zebra_flags = rmac->flags;
|
||||||
|
|
||||||
fpm_mac->vxlan_if = vxlan_if ? vxlan_if->ifindex : 0;
|
fpm_mac->vxlan_if = vxlan_if ? vxlan_if->ifindex : 0;
|
||||||
fpm_mac->svi_if = svi_if ? svi_if->ifindex : 0;
|
fpm_mac->svi_if = svi_if ? svi_if->ifindex : 0;
|
||||||
|
|
||||||
|
@ -594,14 +594,14 @@ int zfpm_netlink_encode_mac(struct fpm_mac_info_t *mac, char *in_buf,
|
|||||||
char buf1[ETHER_ADDR_STRLEN];
|
char buf1[ETHER_ADDR_STRLEN];
|
||||||
size_t buf_offset;
|
size_t buf_offset;
|
||||||
|
|
||||||
struct {
|
struct macmsg {
|
||||||
struct nlmsghdr hdr;
|
struct nlmsghdr hdr;
|
||||||
struct ndmsg ndm;
|
struct ndmsg ndm;
|
||||||
char buf[0];
|
char buf[0];
|
||||||
} *req;
|
} *req;
|
||||||
req = (void *)in_buf;
|
req = (void *)in_buf;
|
||||||
|
|
||||||
buf_offset = ((char *)req->buf) - ((char *)req);
|
buf_offset = offsetof(struct macmsg, buf);
|
||||||
if (in_buf_len < buf_offset)
|
if (in_buf_len < buf_offset)
|
||||||
return 0;
|
return 0;
|
||||||
memset(req, 0, buf_offset);
|
memset(req, 0, buf_offset);
|
||||||
|
Loading…
Reference in New Issue
Block a user