Revision 62e64905 sysdep/unix/krt.c

View differences:

sysdep/unix/krt.c
984 984
static int
985 985
krt_import_control(struct proto *P, rte **new, ea_list **attrs UNUSED, struct linpool *pool UNUSED)
986 986
{
987
  struct krt_proto *p = (struct krt_proto *) P;
987
  // struct krt_proto *p = (struct krt_proto *) P;
988 988
  rte *e = *new;
989 989

  
990 990
  if (e->attrs->src->proto == P)
......
1005 1005
    return -1;
1006 1006
  }
1007 1007

  
1008
  if (!KRT_CF->devroutes && (e->attrs->source != RTS_STATIC_DEVICE))
1009
  {
1010
    struct nexthop *nh = &(e->attrs->nh);
1011
    for (; nh; nh = nh->next)
1012
      if (ipa_nonzero(nh->gw))
1013
	break;
1014

  
1015
    if (!nh) /* Gone through all the nexthops and no explicit GW found */
1016
      return -1;
1017
  }
1018

  
1019 1008
  if (!krt_capable(e))
1020 1009
    return -1;
1021 1010

  

Also available in: Unified diff