Revision b1a1faba 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
16 17

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

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

Also available in: Unified diff