mirror of
https://gitlab.labs.nic.cz/labs/bird.git
synced 2024-05-11 16:54:54 +00:00
Nexthop: Support for label stack in nest
This commit is contained in:
@ -43,6 +43,8 @@
|
||||
|
||||
#include "pipe.h"
|
||||
|
||||
#include <alloca.h>
|
||||
|
||||
static void
|
||||
pipe_rt_notify(struct proto *P, struct channel *src_ch, net *n, rte *new, rte *old, ea_list *attrs)
|
||||
{
|
||||
@ -51,7 +53,7 @@ pipe_rt_notify(struct proto *P, struct channel *src_ch, net *n, rte *new, rte *o
|
||||
struct rte_src *src;
|
||||
|
||||
rte *e;
|
||||
rta a;
|
||||
rta *a;
|
||||
|
||||
if (!new && !old)
|
||||
return;
|
||||
@ -65,12 +67,13 @@ pipe_rt_notify(struct proto *P, struct channel *src_ch, net *n, rte *new, rte *o
|
||||
|
||||
if (new)
|
||||
{
|
||||
memcpy(&a, new->attrs, sizeof(rta));
|
||||
a = alloca(rta_size(new->attrs));
|
||||
memcpy(a, new->attrs, rta_size(new->attrs));
|
||||
|
||||
a.aflags = 0;
|
||||
a.eattrs = attrs;
|
||||
a.hostentry = NULL;
|
||||
e = rte_get_temp(&a);
|
||||
a->aflags = 0;
|
||||
a->eattrs = attrs;
|
||||
a->hostentry = NULL;
|
||||
e = rte_get_temp(a);
|
||||
e->pflags = 0;
|
||||
|
||||
/* Copy protocol specific embedded attributes. */
|
||||
@ -78,7 +81,7 @@ pipe_rt_notify(struct proto *P, struct channel *src_ch, net *n, rte *new, rte *o
|
||||
e->pref = new->pref;
|
||||
e->pflags = new->pflags;
|
||||
|
||||
src = a.src;
|
||||
src = a->src;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user