mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 17:51:53 +00:00
Caching loopback interface.
This commit is contained in:
parent
a8bb459a3f
commit
77772dbc65
@ -107,6 +107,7 @@ krt_sock_send(int cmd, rte *e, char *name)
|
|||||||
struct ks_msg msg;
|
struct ks_msg msg;
|
||||||
char *body = (char *)msg.buf;
|
char *body = (char *)msg.buf;
|
||||||
sockaddr gate, mask, dst;
|
sockaddr gate, mask, dst;
|
||||||
|
static struct iface *loop = NULL;
|
||||||
|
|
||||||
DBG("krt-sock: send %I/%d via %I", net->n.prefix, net->n.pxlen, a->gw);
|
DBG("krt-sock: send %I/%d via %I", net->n.prefix, net->n.pxlen, a->gw);
|
||||||
|
|
||||||
@ -144,6 +145,8 @@ krt_sock_send(int cmd, rte *e, char *name)
|
|||||||
* gateway set
|
* gateway set
|
||||||
*/
|
*/
|
||||||
if(!i)
|
if(!i)
|
||||||
|
{
|
||||||
|
if(!loop)
|
||||||
{
|
{
|
||||||
i = HEAD(iface_list);
|
i = HEAD(iface_list);
|
||||||
|
|
||||||
@ -156,6 +159,8 @@ krt_sock_send(int cmd, rte *e, char *name)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
i = loop;
|
||||||
|
}
|
||||||
|
|
||||||
switch (a->dest)
|
switch (a->dest)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user