Revision f4a60a9b proto/ospf/config.Y

View differences:

proto/ospf/config.Y
68 68
  if (EMPTY_LIST(cf->area_list))
69 69
    cf_error( "No configured areas in OSPF");
70 70

  
71
  /* Define default channel */
72
  if (EMPTY_LIST(this_proto->channels))
73
    channel_config_new(NULL, this_proto->net_type, this_proto);
74

  
71 75
  int areano = 0;
72 76
  int backbone = 0;
73 77
  int nssa = 0;
......
84 88
  cf->abr = areano > 1;
85 89

  
86 90
  /* Route export or NSSA translation (RFC 3101 3.1) */
87
  cf->asbr = (this_proto->out_filter != FILTER_REJECT) || (nssa && cf->abr);
91
  cf->asbr = (proto_cf_main_channel(this_proto)->out_filter != FILTER_REJECT) || (nssa && cf->abr);
88 92

  
89 93
  if (cf->abr && !backbone)
90 94
  {
......
145 149
 | OSPF3 { $$ = 0; }
146 150
 ;
147 151

  
148
ospf_proto_start: proto_start ospf_variant {
149
     this_proto = proto_config_new(&proto_ospf, $1);
150
     init_list(&OSPF_CFG->area_list);
151
     init_list(&OSPF_CFG->vlink_list);
152
     OSPF_CFG->tick = OSPF_DEFAULT_TICK;
153
     OSPF_CFG->ospf2 = $2;
154
  }
155
 ;
152
ospf_proto_start: proto_start ospf_variant
153
{
154
  this_proto = proto_config_new(&proto_ospf, $1);
155
  this_proto->net_type = $2 ? NET_IP4 : NET_IP6;
156

  
157
  init_list(&OSPF_CFG->area_list);
158
  init_list(&OSPF_CFG->vlink_list);
159
  OSPF_CFG->tick = OSPF_DEFAULT_TICK;
160
  OSPF_CFG->ospf2 = $2;
161
};
156 162

  
157 163
ospf_proto:
158 164
   ospf_proto_start proto_name '{'
......
161 167

  
162 168
ospf_proto_item:
163 169
   proto_item
170
 | proto_channel
164 171
 | RFC1583COMPAT bool { OSPF_CFG->rfc1583 = $2; }
165 172
 | STUB ROUTER bool { OSPF_CFG->stub_router = $3; }
166 173
 | ECMP bool { OSPF_CFG->ecmp = $2 ? OSPF_DEFAULT_ECMP_LIMIT : 0; }

Also available in: Unified diff