~ubuntu-branches/ubuntu/saucy/quagga/saucy

« back to all changes in this revision

Viewing changes to bgpd/bgp_zebra.c

  • Committer: Bazaar Package Importer
  • Author(s): Stephan Hermann
  • Date: 2007-09-14 09:47:54 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20070914094754-kqi815lcg6n8mh51
Tags: 0.99.9-1ubuntu1
* Merged new upstream version (LP: #139376)
  - Merged debian/changelog
* Fixes a DoS and some bugs introduced in 0.99.8
  (see: http://www.quagga.net/news2.php?y=2007&m=9&d=7#id1189190760)
* Remaining Ubuntu Patches:
  - debian/rules: use bash as shell
  - debian/quagga.prerm: handle upgrades more gracefully
  - debian/patches/81_32bit_u64.dpatch: Define __u64 as uint64_t
    before including the netlink headers, since that symbol does not exist
    by default on 32 bit arches. Fixes i386/powerpc FTBFS.
  - debian/patches/83_ifaddr_defs.dpatch:
    zebra/rt_netlink.c: #include <linux/if_addr.h> and define IF[L]A_RTA
    macros, so that the file compiles again with our kernel headers.
  - debian/patches/20_ht-20061217-0.99.6-bgp-md5.dpatch: updated for
    linux kernel 2.6.20.

Show diffs side-by-side

added added

removed removed

Lines of Context:
746
746
 
747
747
      ifindex = 0;
748
748
      nexthop = NULL;
749
 
 
 
749
      
 
750
      assert (info->attr->extra);
 
751
      
750
752
      /* Only global address nexthop exists. */
751
 
      if (info->attr->mp_nexthop_len == 16)
752
 
        nexthop = &info->attr->mp_nexthop_global;
 
753
      if (info->attr->extra->mp_nexthop_len == 16)
 
754
        nexthop = &info->attr->extra->mp_nexthop_global;
753
755
      
754
756
      /* If both global and link-local address present. */
755
 
      if (info->attr->mp_nexthop_len == 32)
 
757
      if (info->attr->extra->mp_nexthop_len == 32)
756
758
        {
757
759
          /* Workaround for Cisco's nexthop bug.  */
758
 
          if (IN6_IS_ADDR_UNSPECIFIED (&info->attr->mp_nexthop_global)
 
760
          if (IN6_IS_ADDR_UNSPECIFIED (&info->attr->extra->mp_nexthop_global)
759
761
              && peer->su_remote->sa.sa_family == AF_INET6)
760
762
            nexthop = &peer->su_remote->sin6.sin6_addr;
761
763
          else
762
 
            nexthop = &info->attr->mp_nexthop_local;
 
764
            nexthop = &info->attr->extra->mp_nexthop_local;
763
765
 
764
766
          if (info->peer->nexthop.ifp)
765
767
            ifindex = info->peer->nexthop.ifp->ifindex;
867
869
      struct zapi_ipv6 api;
868
870
      unsigned int ifindex;
869
871
      struct in6_addr *nexthop;
870
 
 
 
872
      
 
873
      assert (info->attr->extra);
 
874
      
871
875
      ifindex = 0;
872
876
      nexthop = NULL;
873
877
 
874
878
      /* Only global address nexthop exists. */
875
 
      if (info->attr->mp_nexthop_len == 16)
876
 
        nexthop = &info->attr->mp_nexthop_global;
 
879
      if (info->attr->extra->mp_nexthop_len == 16)
 
880
        nexthop = &info->attr->extra->mp_nexthop_global;
877
881
 
878
882
      /* If both global and link-local address present. */
879
 
      if (info->attr->mp_nexthop_len == 32)
 
883
      if (info->attr->extra->mp_nexthop_len == 32)
880
884
        {
881
 
          nexthop = &info->attr->mp_nexthop_local;
 
885
          nexthop = &info->attr->extra->mp_nexthop_local;
882
886
          if (info->peer->nexthop.ifp)
883
887
            ifindex = info->peer->nexthop.ifp->ifindex;
884
888
        }