Previous change was mistake.

This commit is contained in:
Ondrej Filip 2004-05-31 17:00:22 +00:00
parent 6f18235aad
commit c222500d8e

View file

@ -13,7 +13,6 @@
#include <net/route.h> #include <net/route.h>
#undef LOCAL_DEBUG #undef LOCAL_DEBUG
#define LOCAL_DEBUG
#include "nest/bird.h" #include "nest/bird.h"
#include "nest/iface.h" #include "nest/iface.h"
@ -37,7 +36,7 @@ krt_capable(rte *e)
(a->dest == RTD_ROUTER (a->dest == RTD_ROUTER
|| a->dest == RTD_DEVICE || a->dest == RTD_DEVICE
#ifdef RTF_REJECT #ifdef RTF_REJECT
|| a->dest == RTD_UNREACHABLE /* FIXME Blackhole, prohibited?? */ || a->dest == RTD_UNREACHABLE
#endif #endif
); );
} }
@ -46,12 +45,12 @@ static void
krt_ioctl(int ioc, rte *e, char *name) krt_ioctl(int ioc, rte *e, char *name)
{ {
net *net = e->net; net *net = e->net;
struct ortentry re; struct rtentry re;
rta *a = e->attrs; rta *a = e->attrs;
bzero(&re, sizeof(re)); bzero(&re, sizeof(re));
fill_in_sockaddr((struct sockaddr_in *) &re.rt_dst, net->n.prefix, 0); fill_in_sockaddr((struct sockaddr_in *) &re.rt_dst, net->n.prefix, 0);
//fill_in_sockaddr((struct sockaddr_in *) &re.rt_genmask, ipa_mkmask(net->n.pxlen), 0); fill_in_sockaddr((struct sockaddr_in *) &re.rt_genmask, ipa_mkmask(net->n.pxlen), 0);
re.rt_flags = RTF_UP; re.rt_flags = RTF_UP;
if (net->n.pxlen == 32) if (net->n.pxlen == 32)
re.rt_flags |= RTF_HOST; re.rt_flags |= RTF_HOST;
@ -62,7 +61,7 @@ krt_ioctl(int ioc, rte *e, char *name)
re.rt_flags |= RTF_GATEWAY; re.rt_flags |= RTF_GATEWAY;
break; break;
case RTD_DEVICE: case RTD_DEVICE:
//re.rt_dev = a->iface->name; re.rt_dev = a->iface->name;
break; break;
#ifdef RTF_REJECT #ifdef RTF_REJECT
case RTD_UNREACHABLE: case RTD_UNREACHABLE: