Revision 153f02da proto/rip/rip.c

View differences:

proto/rip/rip.c
630 630
  else if (ic->mode == RIP_IM_MULTICAST)
631 631
    ifa->addr = rip_is_v2(p) ? IP4_RIP_ROUTERS : IP6_RIP_ROUTERS;
632 632
  else /* Broadcast */
633
    ifa->addr = iface->addr->brd;
633
    ifa->addr = iface->addr4->brd;
634
  /*
635
   * The above is just a workaround for BSD as it can't send broadcasts
636
   * to 255.255.255.255. BSD systems need the network broadcast address instead.
637
   *
638
   * TODO: move this to sysdep code
639
   */
634 640

  
635 641
  init_list(&ifa->neigh_list);
636 642

  
......
706 712

  
707 713
  WALK_LIST(iface, iface_list)
708 714
  {
709
    if (! (iface->flags & IF_UP))
715
    if (!(iface->flags & IF_UP))
716
      continue;
717

  
718
    /* Ignore ifaces without appropriate address */
719
    if (rip_is_v2(p) ? !iface->addr4 : !iface->llv6)
710 720
      continue;
711 721

  
712 722
    struct rip_iface *ifa = rip_find_iface(p, iface);
......
744 754
  {
745 755
    struct rip_iface_config *ic = (void *) iface_patt_find(&cf->patt_list, iface, NULL);
746 756

  
757
    /* Ignore ifaces without appropriate address */
758
    if (rip_is_v2(p) ? !iface->addr4 : !iface->llv6)
759
      return;
760

  
747 761
    if (ic)
748 762
      rip_add_iface(p, iface, ic);
749 763

  

Also available in: Unified diff