Revision c222500d sysdep/unix/krt-set.c

View differences:

sysdep/unix/krt-set.c
13 13
#include <net/route.h>
14 14

  
15 15
#undef LOCAL_DEBUG
16
#define LOCAL_DEBUG
17 16

  
18 17
#include "nest/bird.h"
19 18
#include "nest/iface.h"
......
37 36
    (a->dest == RTD_ROUTER
38 37
     || a->dest == RTD_DEVICE
39 38
#ifdef RTF_REJECT
40
     || a->dest == RTD_UNREACHABLE		/* FIXME Blackhole, prohibited?? */
39
     || a->dest == RTD_UNREACHABLE
41 40
#endif
42 41
     );
43 42
}
......
46 45
krt_ioctl(int ioc, rte *e, char *name)
47 46
{
48 47
  net *net = e->net;
49
  struct ortentry re;
48
  struct rtentry re;
50 49
  rta *a = e->attrs;
51 50

  
52 51
  bzero(&re, sizeof(re));
53 52
  fill_in_sockaddr((struct sockaddr_in *) &re.rt_dst, net->n.prefix, 0);
54
  //fill_in_sockaddr((struct sockaddr_in *) &re.rt_genmask, ipa_mkmask(net->n.pxlen), 0);
53
  fill_in_sockaddr((struct sockaddr_in *) &re.rt_genmask, ipa_mkmask(net->n.pxlen), 0);
55 54
  re.rt_flags = RTF_UP;
56 55
  if (net->n.pxlen == 32)
57 56
    re.rt_flags |= RTF_HOST;
......
62 61
      re.rt_flags |= RTF_GATEWAY;
63 62
      break;
64 63
    case RTD_DEVICE:
65
      //re.rt_dev = a->iface->name;
64
      re.rt_dev = a->iface->name;
66 65
      break;
67 66
#ifdef RTF_REJECT
68 67
    case RTD_UNREACHABLE:

Also available in: Unified diff