memcpy uses value of mls (mpls label stack) instead of address

Ramanathan Selvamani ramana.it05 at gmail.com
Fri Apr 12 06:39:34 CEST 2024


Hi Team,

I am resending the line of code again since the last mail was not showing
up correctly.

memcpy(mls.stac*k*, &a->nh.label[a->nh.labels - mls.len], mls.len
* sizeof(u32));

Thanks.


On Fri, 12 Apr 2024 at 09:58, Ramanathan Selvamani <ramana.it05 at gmail.com>
wrote:

> Hi Team,
>
> I have tried to use mpls_label_stack to keep some meta data for each route.
> But the values of meta data were not copied correctly.
>
> I just found the below code in "rt_next_hop_update_rte" function in
> rt-table.c
>
> memcpy(*mls.**stack*, &a->nh.label[a->nh.labels - mls.len], mls.len *
> sizeof(u32));
>
> Here the "mls.stack" is passed directly instead of its address in memcpy.
>
> Kindly let me know your thoughts on this.
>
> Thanks,
> Ramanathan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20240412/be2dc536/attachment.htm>


More information about the Bird-users mailing list