Revision a7a7372a proto/ospf/iface.c

View differences:

proto/ospf/iface.c
620 620

  
621 621
  add_tail(&oa->po->iface_list, NODE ifa);
622 622

  
623
  /*
624
   * In some cases we allow more ospf_ifaces on one physical iface.
625
   * In OSPFv2, if they use different IP address prefix.
626
   * In OSPFv3, if they use different instance_id.
627
   * Therefore, we store such info to lock->addr field.
628
   */
629

  
630
  // XXXX review
631 623
  struct object_lock *lock = olock_new(pool);
632
  lock->addr = ospf_is_v2(p) ? ifa->addr->prefix : _MI6(0,0,0,ifa->instance_id);
624
  lock->addr = ospf_is_v2(p) ? ifa->addr->prefix : IPA_NONE;
633 625
  lock->type = OBJLOCK_IP;
634 626
  lock->port = OSPF_PROTO;
627
  lock->inst = ifa->instance_id;
635 628
  lock->iface = iface;
636 629
  lock->data = ifa;
637 630
  lock->hook = ospf_iface_add;
......
997 990
	BIT32_SET(s->ignore, id);
998 991

  
999 992
	/* If we already found it in previous areas, ignore it and add warning */
1000
	if (!BIT32_TEST(s->active, id))
993
	if (BIT32_TEST(s->active, id))
1001 994
	  { s->warn = 1; continue; }
1002 995

  
1003 996
	BIT32_SET(s->active, id);
......
1046 1039
  {
1047 1040
    struct ospf_mip_walk s = { .iface = a->iface, .a = a };
1048 1041
    while (ospf_walk_matching_iface_patts(p, &s))
1049
      ospf_iface_new(s.oa, s.a, s.ip);
1042
      ospf_iface_new(s.oa, a, s.ip);
1050 1043
  }
1051 1044

  
1052 1045
  if (flags & IF_CHANGE_DOWN)
......
1078 1071
    {
1079 1072
      struct ospf_mip_walk s = { .iface = a->iface };
1080 1073
      while (ospf_walk_matching_iface_patts(p, &s))
1081
	ospf_iface_new(s.oa, s.a, s.ip);
1074
	ospf_iface_new(s.oa, a, s.ip);
1082 1075
    }
1083 1076

  
1084 1077
    if (flags & IF_CHANGE_DOWN)

Also available in: Unified diff