Statistics
| Branch: | Revision:

iof-bird-daemon / proto / ospf / iface.c @ a3062085

History | View | Annotate | Download (15.2 KB)

1
/*
2
 *        BIRD -- OSPF
3
 *
4
 *        (c) 1999--2005 Ondrej Filip <feela@network.cz>
5
 *
6
 *        Can be freely distributed and used under the terms of the GNU GPL.
7
 */
8

    
9
#include "ospf.h"
10

    
11
char *ospf_is[] = { "down", "loop", "waiting", "point-to-point", "drother",
12
  "backup", "dr"
13
};
14

    
15
char *ospf_ism[] = { "interface up", "wait timer fired", "backup seen",
16
  "neighbor change", "loop indicated", "unloop indicated", "interface down"
17
};
18

    
19
char *ospf_it[] = { "broadcast", "nbma", "point-to-point", "virtual link" };
20

    
21
static void
22
poll_timer_hook(timer * timer)
23
{
24
  log("POLL!");
25
  ospf_hello_send(timer, 1, NULL);
26
}
27

    
28
static void
29
hello_timer_hook(timer * timer)
30
{
31
  ospf_hello_send(timer, 0, NULL);
32
}
33

    
34
static void
35
wait_timer_hook(timer * timer)
36
{
37
  struct ospf_iface *ifa = (struct ospf_iface *) timer->data;
38
  struct proto *p = &ifa->oa->po->proto;
39

    
40
  OSPF_TRACE(D_EVENTS, "Wait timer fired on interface %s.", ifa->iface->name);
41
  ospf_iface_sm(ifa, ISM_WAITF);
42
}
43

    
44
u32
45
rxbufsize(struct ospf_iface *ifa)
46
{
47
  switch(ifa->rxbuf)
48
  {
49
    case OSPF_RXBUF_NORMAL:
50
      return (ifa->iface->mtu * 2);
51
      break;
52
    case OSPF_RXBUF_LARGE:
53
      return OSPF_MAX_PKT_SIZE;
54
      break;
55
    default:
56
      return ifa->rxbuf;
57
      break;
58
  }
59
}
60

    
61
static sock *
62
ospf_open_socket(struct ospf_iface *ifa, int mc)
63
{
64
  sock *ipsk;
65
  struct proto *p = &ifa->oa->po->proto;
66

    
67
  ipsk = sk_new(p->pool);
68
  ipsk->type = SK_IP;
69
  ipsk->dport = OSPF_PROTO;
70

    
71
#ifdef OSPFv2
72
  /*
73
   * In Linux IPv4, binding a raw socket to an IP address of an iface causes
74
   * that the socket does not receive multicast packets, as they have
75
   * different (multicast) destination IP address.
76
   *
77
   * We want such filter in the vlink (non-mc) socket.
78
   */
79
  ipsk->saddr = mc ? IPA_NONE : ifa->iface->addr->ip;
80
#else /* OSPFv3 */
81
  ipsk->saddr = ifa->lladdr;
82
#endif
83

    
84
  ipsk->tos = IP_PREC_INTERNET_CONTROL;
85
  ipsk->ttl = 1;
86
  if (ifa->type == OSPF_IT_VLINK)
87
    ipsk->ttl = 255;
88
  ipsk->rx_hook = ospf_rx_hook;
89
  ipsk->tx_hook = ospf_tx_hook;
90
  ipsk->err_hook = ospf_err_hook;
91
  ipsk->iface = ifa->iface;
92
  ipsk->rbsize = rxbufsize(ifa);
93
  ipsk->tbsize = ifa->iface->mtu;
94
  ipsk->data = (void *) ifa;
95
  if (sk_open(ipsk) != 0)
96
    goto err;
97

    
98
#ifdef OSPFv3
99
  /* 12 is an offset of the checksum in an OSPF packet */
100
  if (sk_set_ipv6_checksum(ipsk, 12) < 0)
101
    goto err;
102
#endif
103

    
104
  if (mc)
105
  {
106
    if (sk_setup_multicast(ipsk) < 0)
107
      goto err;
108

    
109
    if (sk_join_group(ipsk, AllSPFRouters) < 0)
110
      goto err;
111
  }
112

    
113
  return ipsk;
114

    
115
 err:
116
  rfree(ipsk);
117
  return NULL;
118
}
119

    
120

    
121
/**
122
 * ospf_iface_chstate - handle changes of interface state
123
 * @ifa: OSPF interface
124
 * @state: new state
125
 *
126
 * Many actions must be taken according to interface state changes. New network
127
 * LSAs must be originated, flushed, new multicast sockets to listen for messages for
128
 * %ALLDROUTERS have to be opened, etc.
129
 */
130
void
131
ospf_iface_chstate(struct ospf_iface *ifa, u8 state)
132
{
133
  struct proto_ospf *po = ifa->oa->po;
134
  struct proto *p = &po->proto;
135
  u8 oldstate = ifa->state;
136

    
137
  if (oldstate != state)
138
  {
139
    ifa->state = state;
140

    
141
    if (ifa->type == OSPF_IT_VLINK)
142
    {
143
      OSPF_TRACE(D_EVENTS,
144
                 "Changing state of virtual link %R from \"%s\" into \"%s\".",
145
                 ifa->vid, ospf_is[oldstate], ospf_is[state]);
146
      if (state == OSPF_IS_PTP)
147
      {
148
        ifa->sk = ospf_open_socket(ifa, 0);
149
      }
150
    }
151
    else
152
    {
153
      OSPF_TRACE(D_EVENTS,
154
                 "Changing state of iface: %s from \"%s\" into \"%s\".",
155
                 ifa->iface->name, ospf_is[oldstate], ospf_is[state]);
156
      if (ifa->iface->flags & IF_MULTICAST)
157
      {
158
        if ((ifa->type != OSPF_IT_NBMA) && (ifa->ioprob == OSPF_I_OK) &&
159
            ((state == OSPF_IS_BACKUP) || (state == OSPF_IS_DR)))
160
        {
161
          if (!ifa->dr_up == 0)
162
          {
163
            /* FIXME some error handing ? */
164
            sk_join_group(ifa->sk, AllDRouters);
165
            ifa->dr_up = 1;
166
          }
167
        }
168
        else if (ifa->dr_up)
169
        {
170
          sk_leave_group(ifa->sk, AllDRouters);
171
          ifa->dr_up = 0;
172
        }
173
        if ((oldstate == OSPF_IS_DR) && (ifa->net_lsa != NULL))
174
        {
175
          ifa->net_lsa->lsa.age = LSA_MAXAGE;
176
          if (state >= OSPF_IS_WAITING)
177
          {
178
            ospf_lsupd_flush_nlsa(po, ifa->net_lsa);
179
          }
180
          if (can_flush_lsa(po))
181
            flush_lsa(ifa->net_lsa, po);
182
          ifa->net_lsa = NULL;
183
        }
184
      }
185
    }
186
  }
187
}
188

    
189
static void
190
ospf_iface_down(struct ospf_iface *ifa)
191
{
192
  struct ospf_neighbor *n, *nx;
193
  struct proto_ospf *po = ifa->oa->po;
194
  struct proto *p = &po->proto;
195
  struct ospf_iface *iff;
196

    
197
  /* First of all kill all the related vlinks */
198
  if (ifa->type != OSPF_IT_VLINK)
199
  {
200
    WALK_LIST(iff, po->iface_list)
201
    {
202
      if ((iff->type == OSPF_IT_VLINK) && (iff->iface == ifa->iface))
203
        ospf_iface_down(iff);
204
    }
205
  }
206

    
207
  WALK_LIST_DELSAFE(n, nx, ifa->neigh_list)
208
  {
209
    OSPF_TRACE(D_EVENTS, "Removing neighbor %I", n->ip);
210
    ospf_neigh_remove(n);
211
  }
212

    
213
  rfree(ifa->sk);
214
  ifa->sk = NULL;
215

    
216
  if (ifa->type == OSPF_IT_VLINK)
217
  {
218
    ifa->iface = NULL;
219
    return;
220
  }
221
  else
222
  {
223
    rfree(ifa->wait_timer);
224
    rfree(ifa->hello_timer);
225
    rfree(ifa->poll_timer);
226
    rfree(ifa->lock);
227
    rem_node(NODE ifa);
228
    mb_free(ifa);
229
  }
230
}
231

    
232
/**
233
 * ospf_iface_sm - OSPF interface state machine
234
 * @ifa: OSPF interface
235
 * @event: event comming to state machine
236
 *
237
 * This fully respects 9.3 of RFC 2328 except we don't use %LOOP state of
238
 * interface.
239
 */
240
void
241
ospf_iface_sm(struct ospf_iface *ifa, int event)
242
{
243
  struct ospf_area *oa = ifa->oa;
244

    
245
  DBG("SM on %s %s. Event is '%s'\n", (ifa->type == OSPF_IT_VLINK) ? "vlink" : "iface",
246
    ifa->iface ? ifa->iface->name : "(none)" , ospf_ism[event]);
247

    
248
  switch (event)
249
  {
250
  case ISM_UP:
251
    if (ifa->state == OSPF_IS_DOWN)
252
    {
253
      /* Now, nothing should be adjacent */
254
      if ((ifa->type == OSPF_IT_PTP) || (ifa->type == OSPF_IT_VLINK))
255
      {
256
        ospf_iface_chstate(ifa, OSPF_IS_PTP);
257
      }
258
      else
259
      {
260
        if (ifa->priority == 0)
261
          ospf_iface_chstate(ifa, OSPF_IS_DROTHER);
262
        else
263
        {
264
          ospf_iface_chstate(ifa, OSPF_IS_WAITING);
265
          tm_start(ifa->wait_timer, ifa->waitint);
266
        }
267
      }
268

    
269
      tm_start(ifa->hello_timer, ifa->helloint);
270

    
271
      if (ifa->poll_timer)
272
        tm_start(ifa->poll_timer, ifa->pollint);
273

    
274
      hello_timer_hook(ifa->hello_timer);
275
    }
276
    schedule_link_lsa(ifa);
277
    schedule_rt_lsa(ifa->oa);
278
    break;
279
  case ISM_BACKS:
280
  case ISM_WAITF:
281
    if (ifa->state == OSPF_IS_WAITING)
282
    {
283
      bdr_election(ifa);
284
    }
285
    break;
286
  case ISM_NEICH:
287
    if ((ifa->state == OSPF_IS_DROTHER) || (ifa->state == OSPF_IS_DR) ||
288
        (ifa->state == OSPF_IS_BACKUP))
289
    {
290
      bdr_election(ifa);
291
      schedule_rt_lsa(ifa->oa);
292
    }
293
    break;
294
  case ISM_DOWN:
295
    ospf_iface_chstate(ifa, OSPF_IS_DOWN);
296
    ospf_iface_down(ifa);
297
    schedule_link_lsa(ifa);
298
    schedule_rt_lsa(oa);
299
    break;
300
  case ISM_LOOP:                /* Useless? */
301
    ospf_iface_chstate(ifa, OSPF_IS_LOOP);
302
    ospf_iface_down(ifa);
303
    schedule_rt_lsa(ifa->oa);
304
    break;
305
  case ISM_UNLOOP:
306
    ospf_iface_chstate(ifa, OSPF_IS_DOWN);
307
    schedule_rt_lsa(ifa->oa);
308
    break;
309
  default:
310
    bug("OSPF_I_SM - Unknown event?");
311
    break;
312
  }
313

    
314
}
315

    
316
#if 0
317
static sock *
318
ospf_open_mc_socket(struct ospf_iface *ifa)
319
{
320
  sock *mcsk;
321
  struct proto *p = &ifa->oa->po->proto;
322

323
  mcsk = sk_new(p->pool);
324
  mcsk->type = SK_IP_MC;
325
  mcsk->sport = 0;
326
  mcsk->dport = OSPF_PROTO;
327

328
#ifdef OSPFv2
329
  mcsk->saddr = AllSPFRouters;
330
#else /* OSPFv3 */
331
  // mcsk->saddr = AllSPFRouters;
332
  mcsk->saddr = ifa->lladdr;
333
#endif
334

    
335
  mcsk->daddr = AllSPFRouters;
336
  mcsk->tos = IP_PREC_INTERNET_CONTROL;
337
  mcsk->ttl = 1;
338
  mcsk->rx_hook = ospf_rx_hook;
339
  mcsk->tx_hook = ospf_tx_hook;
340
  mcsk->err_hook = ospf_err_hook;
341
  mcsk->iface = ifa->iface;
342
  mcsk->rbsize = rxbufsize(ifa);
343
  mcsk->tbsize = ifa->iface->mtu;
344
  mcsk->data = (void *) ifa;
345
  if (sk_open(mcsk) != 0)
346
  {
347
    DBG("%s: SK_OPEN: mc open failed.\n", p->name);
348
    return (NULL);
349
  }
350
  DBG("%s: SK_OPEN: mc opened.\n", p->name);
351
  return (mcsk);
352
}
353
#endif
354

    
355
u8
356
ospf_iface_clasify(struct iface * ifa)
357
{
358
  if ((ifa->flags & (IF_MULTIACCESS | IF_MULTICAST)) ==
359
      (IF_MULTIACCESS | IF_MULTICAST))
360
    return OSPF_IT_BCAST;
361

    
362
  if ((ifa->flags & (IF_MULTIACCESS | IF_MULTICAST)) == IF_MULTIACCESS)
363
    return OSPF_IT_NBMA;
364

    
365
  return OSPF_IT_PTP;
366
}
367

    
368
struct ospf_iface *
369
ospf_iface_find(struct proto_ospf *p, struct iface *what)
370
{
371
  struct ospf_iface *i;
372

    
373
  WALK_LIST(i, p->iface_list) if ((i->iface == what) && (i->type != OSPF_IT_VLINK))
374
    return i;
375
  return NULL;
376
}
377

    
378
static void
379
ospf_iface_add(struct object_lock *lock)
380
{
381
  struct ospf_iface *ifa = lock->data;
382
  struct proto_ospf *po = ifa->oa->po;
383
  struct proto *p = &po->proto;
384
  struct iface *iface = lock->iface;
385

    
386
  ifa->lock = lock;
387

    
388
  ifa->ioprob = OSPF_I_OK;
389

    
390
  ifa->sk = ospf_open_socket(ifa, ifa->type != OSPF_IT_NBMA);
391
  if (ifa->sk == NULL)
392
  {
393
    log("%s: Huh? could not open ip socket on interface %s?", p->name,
394
        iface->name);
395
    log("%s: Declaring as stub.", p->name);
396
    ifa->stub = 1;
397
    ifa->ioprob += OSPF_I_IP;
398
  }
399

    
400
  ifa->state = OSPF_IS_DOWN;
401
  ospf_iface_sm(ifa, ISM_UP);
402
}
403

    
404
void
405
ospf_iface_new(struct proto_ospf *po, struct iface *iface,
406
               struct ospf_area_config *ac, struct ospf_iface_patt *ip)
407
{
408
  struct proto *p = &po->proto;
409
  struct ospf_iface *ifa;
410
  struct nbma_node *nbma, *nb;
411
  struct object_lock *lock;
412
  struct ospf_area *oa;
413

    
414
  ifa = mb_allocz(p->pool, sizeof(struct ospf_iface));
415
  ifa->iface = iface;
416

    
417
  ifa->cost = ip->cost;
418
  ifa->rxmtint = ip->rxmtint;
419
  ifa->inftransdelay = ip->inftransdelay;
420
  ifa->priority = ip->priority;
421
  ifa->helloint = ip->helloint;
422
  ifa->pollint = ip->pollint;
423
  ifa->strictnbma = ip->strictnbma;
424
  ifa->waitint = ip->waitint;
425
  ifa->dead = (ip->dead == 0) ? ip->deadc * ifa->helloint : ip->dead;
426
  ifa->stub = ip->stub;
427

    
428
#ifdef OSPFv2
429
  ifa->autype = ip->autype;
430
  ifa->passwords = ip->passwords;
431
#endif
432

    
433
#ifdef OSPFv3
434
  ifa->instance_id = ip->instance_id;
435

    
436
  ifa->lladdr = IPA_NONE;
437

    
438
  /* Find link-local address */
439
  if (ifa->type != OSPF_IT_VLINK)
440
    {
441
      struct ifa *a;
442
      WALK_LIST(a, iface->addrs)
443
        if (a->scope == SCOPE_LINK)
444
          {
445
            ifa->lladdr = a->ip;
446
            break;
447
          }
448

    
449
      if (! ipa_nonzero(ifa->lladdr))
450
        log(L_WARN "%s: Missing link local address on interface %s", p->name,  iface->name);
451
    }
452
#endif
453

    
454
  ifa->rxbuf = ip->rxbuf;
455

    
456
  if (ip->type == OSPF_IT_UNDEF)
457
    ifa->type = ospf_iface_clasify(ifa->iface);
458
  else
459
    ifa->type = ip->type;
460

    
461
  init_list(&ifa->neigh_list);
462
  init_list(&ifa->nbma_list);
463

    
464
  WALK_LIST(nb, ip->nbma_list)
465
  {
466
    nbma = mb_alloc(p->pool, sizeof(struct nbma_node));
467
    nbma->ip = nb->ip;
468
    nbma->eligible = nb->eligible;
469
    add_tail(&ifa->nbma_list, NODE nbma);
470
  }
471

    
472
  /* Add hello timer */
473
  ifa->hello_timer = tm_new(p->pool);
474
  ifa->hello_timer->data = ifa;
475
  ifa->hello_timer->randomize = 0;
476
  ifa->hello_timer->hook = hello_timer_hook;
477
  ifa->hello_timer->recurrent = ifa->helloint;
478
  DBG("%s: Installing hello timer. (%u)\n", p->name, ifa->helloint);
479

    
480
  if (ifa->type == OSPF_IT_NBMA)
481
  {
482
    ifa->poll_timer = tm_new(p->pool);
483
    ifa->poll_timer->data = ifa;
484
    ifa->poll_timer->randomize = 0;
485
    ifa->poll_timer->hook = poll_timer_hook;
486
    ifa->poll_timer->recurrent = ifa->pollint;
487
    DBG("%s: Installing poll timer. (%u)\n", p->name, ifa->pollint);
488
  }
489
  else
490
    ifa->poll_timer = NULL;
491

    
492
  ifa->wait_timer = tm_new(p->pool);
493
  ifa->wait_timer->data = ifa;
494
  ifa->wait_timer->randomize = 0;
495
  ifa->wait_timer->hook = wait_timer_hook;
496
  ifa->wait_timer->recurrent = 0;
497
  DBG("%s: Installing wait timer. (%u)\n", p->name, ifa->waitint);
498
  add_tail(&((struct proto_ospf *) p)->iface_list, NODE ifa);
499
  ifa->state = OSPF_IS_DOWN;
500

    
501
  ifa->oa = NULL;
502
  WALK_LIST(oa, po->area_list)
503
  {
504
    if (oa->areaid == ac->areaid)
505
    {
506
      ifa->oa = oa;
507
      break;
508
    }
509
  }
510

    
511
  if (!ifa->oa)
512
    bug("Cannot add any area to accepted Interface");
513
  else
514

    
515
  if (ifa->type == OSPF_IT_VLINK)
516
  {
517
    ifa->oa = po->backbone;
518
    ifa->voa = oa;
519
    ifa->vid = ip->vid;
520
    return;                        /* Don't lock, don't add sockets */
521
  }
522

    
523
  lock = olock_new(p->pool);
524
  lock->addr = AllSPFRouters;
525
  lock->type = OBJLOCK_IP;
526
  lock->port = OSPF_PROTO;
527
  lock->iface = iface;
528
  lock->data = ifa;
529
  lock->hook = ospf_iface_add;
530

    
531
  olock_acquire(lock);
532
}
533

    
534
void
535
ospf_iface_change_mtu(struct proto_ospf *po, struct ospf_iface *ifa)
536
{
537
  struct proto *p = &po->proto;
538
  struct ospf_packet *op;
539
  struct ospf_neighbor *n;
540
  OSPF_TRACE(D_EVENTS, "Changing MTU on interface %s.", ifa->iface->name);
541

    
542
  if (ifa->sk)
543
  {
544
    ifa->sk->rbsize = rxbufsize(ifa);
545
    ifa->sk->tbsize = ifa->iface->mtu;
546
    sk_reallocate(ifa->sk);
547
  }
548

    
549
  WALK_LIST(n, ifa->neigh_list)
550
  {
551
    op = (struct ospf_packet *) n->ldbdes;
552
    n->ldbdes = mb_allocz(n->pool, ifa->iface->mtu);
553

    
554
    if (ntohs(op->length) <= ifa->iface->mtu)        /* If the packet in old buffer is bigger, let it filled by zeros */
555
      memcpy(n->ldbdes, op, ifa->iface->mtu);        /* If the packet is old is same or smaller, copy it */
556

    
557
    rfree(op);
558
  }
559
}
560

    
561
void
562
ospf_iface_notify(struct proto *p, unsigned flags, struct iface *iface)
563
{
564
  struct proto_ospf *po = (struct proto_ospf *) p;
565
  struct ospf_config *c = (struct ospf_config *) (p->cf);
566
  struct ospf_area_config *ac;
567
  struct ospf_iface_patt *ip = NULL;
568
  struct ospf_iface *ifa;
569

    
570
  DBG("%s: If notify called\n", p->name);
571
  if (iface->flags & IF_IGNORE)
572
    return;
573

    
574
  if (flags & IF_CHANGE_UP)
575
  {
576
    WALK_LIST(ac, c->area_list)
577
    {
578
      if (ip = (struct ospf_iface_patt *)
579
          iface_patt_find(&ac->patt_list, iface))
580
        break;
581
    }
582

    
583
    if (ip)
584
    {
585
      OSPF_TRACE(D_EVENTS, "Using interface %s.", iface->name);
586
      ospf_iface_new(po, iface, ac, ip);
587
    }
588
  }
589

    
590
  if (flags & IF_CHANGE_DOWN)
591
  {
592
    if ((ifa = ospf_iface_find((struct proto_ospf *) p, iface)) != NULL)
593
    {
594
      OSPF_TRACE(D_EVENTS, "Killing interface %s.", iface->name);
595
      ospf_iface_sm(ifa, ISM_DOWN);
596
    }
597
  }
598

    
599
  if (flags & IF_CHANGE_MTU)
600
  {
601
    if ((ifa = ospf_iface_find((struct proto_ospf *) p, iface)) != NULL)
602
      ospf_iface_change_mtu(po, ifa);
603
  }
604
}
605

    
606
void
607
ospf_iface_info(struct ospf_iface *ifa)
608
{
609
  char *strict = "(strict)";
610

    
611
  if ((ifa->type != OSPF_IT_NBMA) || (ifa->strictnbma == 0))
612
    strict = "";
613
  if (ifa->type == OSPF_IT_VLINK)
614
  {
615
    cli_msg(-1015, "Virtual link to %R:", ifa->vid);
616
    cli_msg(-1015, "\tPeer IP: %I", ifa->vip);
617
    cli_msg(-1015, "\tTransit area: %R (%u)", ifa->voa->areaid,
618
            ifa->voa->areaid);
619
    cli_msg(-1015, "\tInterface: \"%s\"",
620
            (ifa->iface ? ifa->iface->name : "(none)"));
621
  }
622
  else
623
  {
624
    cli_msg(-1015, "Interface \"%s\":",
625
            (ifa->iface ? ifa->iface->name : "(none)"));
626
    cli_msg(-1015, "\tType: %s %s", ospf_it[ifa->type], strict);
627
    cli_msg(-1015, "\tArea: %R (%u)", ifa->oa->areaid, ifa->oa->areaid);
628
  }
629
  cli_msg(-1015, "\tState: %s %s", ospf_is[ifa->state],
630
          ifa->stub ? "(stub)" : "");
631
  cli_msg(-1015, "\tPriority: %u", ifa->priority);
632
  cli_msg(-1015, "\tCost: %u", ifa->cost);
633
  cli_msg(-1015, "\tHello timer: %u", ifa->helloint);
634

    
635
  if (ifa->type == OSPF_IT_NBMA)
636
  {
637
    cli_msg(-1015, "\tPoll timer: %u", ifa->pollint);
638
  }
639
  cli_msg(-1015, "\tWait timer: %u", ifa->waitint);
640
  cli_msg(-1015, "\tDead timer: %u", ifa->dead);
641
  cli_msg(-1015, "\tRetransmit timer: %u", ifa->rxmtint);
642
  if ((ifa->type == OSPF_IT_BCAST) || (ifa->type == OSPF_IT_NBMA))
643
  {
644
    cli_msg(-1015, "\tDesigned router (ID): %R", ifa->drid);
645
    cli_msg(-1015, "\tDesigned router (IP): %I", ifa->drip);
646
    cli_msg(-1015, "\tBackup designed router (ID): %R", ifa->bdrid);
647
    cli_msg(-1015, "\tBackup designed router (IP): %I", ifa->bdrip);
648
  }
649
}
650

    
651
void
652
ospf_iface_shutdown(struct ospf_iface *ifa)
653
{
654
  init_list(&ifa->neigh_list);
655
  hello_timer_hook(ifa->hello_timer);
656
}