Commit d15b0b0a authored by Ondrej Zajicek (work)'s avatar Ondrej Zajicek (work)
Browse files

BGP redesign

Integrated and extensible BGP with generalized AFI handling,
support for IPv4+IPv6 AFI and unicast+multicast SAFI.
parent 5df4073c
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -170,7 +170,7 @@ fi
AC_SUBST(iproutedir)
AC_SUBST(iproutedir)


# all_protocols="$proto_bfd babel bgp ospf pipe radv rip static"
# all_protocols="$proto_bfd babel bgp ospf pipe radv rip static"
all_protocols="$proto_bfd ospf pipe radv rip static"
all_protocols="$proto_bfd bgp ospf pipe radv rip static"


all_protocols=`echo $all_protocols | sed 's/ /,/g'`
all_protocols=`echo $all_protocols | sed 's/ /,/g'`


+1 −1
Original line number Original line Diff line number Diff line
@@ -1065,7 +1065,7 @@ interpret(struct f_inst *what)
      l->count = 1;
      l->count = 1;
      l->attrs[0].id = code;
      l->attrs[0].id = code;
      l->attrs[0].flags = 0;
      l->attrs[0].flags = 0;
      l->attrs[0].type = what->aux | EAF_ORIGINATED;
      l->attrs[0].type = what->aux | EAF_ORIGINATED | EAF_FRESH;


      switch (what->aux & EAF_TYPE_MASK) {
      switch (what->aux & EAF_TYPE_MASK) {
      case EAF_TYPE_INT:
      case EAF_TYPE_INT:
+1 −0
Original line number Original line Diff line number Diff line
@@ -35,6 +35,7 @@
#define DELTA(a,b) (((a)>=(b))?(a)-(b):(b)-(a))
#define DELTA(a,b) (((a)>=(b))?(a)-(b):(b)-(a))
#define ARRAY_SIZE(a) (sizeof(a)/sizeof(*(a)))
#define ARRAY_SIZE(a) (sizeof(a)/sizeof(*(a)))
#define CALL(fn, args...) ({ if (fn) fn(args); })
#define CALL(fn, args...) ({ if (fn) fn(args); })
#define ADVANCE(w, r, l) ({ r -= l; w += l; })


static inline int uint_cmp(uint i1, uint i2)
static inline int uint_cmp(uint i1, uint i2)
{ return (int)(i1 > i2) - (int)(i1 < i2); }
{ return (int)(i1 > i2) - (int)(i1 < i2); }
+1 −0
Original line number Original line Diff line number Diff line
@@ -91,6 +91,7 @@ typedef ip6_addr ip_addr;
#define ipa_to_u32(x) ip4_to_u32(ipa_to_ip4(x))
#define ipa_to_u32(x) ip4_to_u32(ipa_to_ip4(x))


#define ipa_is_ip4(a) ip6_is_v4mapped(a)
#define ipa_is_ip4(a) ip6_is_v4mapped(a)
#define ipa_is_ip6(a) (! ip6_is_v4mapped(a))


#define IPA_NONE4 ipa_from_ip4(IP4_NONE)
#define IPA_NONE4 ipa_from_ip4(IP4_NONE)
#define IPA_NONE6 ipa_from_ip6(IP6_NONE)
#define IPA_NONE6 ipa_from_ip6(IP6_NONE)
+12 −0
Original line number Original line Diff line number Diff line
@@ -158,3 +158,15 @@ add_tail_list(list *to, list *l)
  q->next = &to->tail_node;
  q->next = &to->tail_node;
  to->tail = q;
  to->tail = q;
}
}

LIST_INLINE uint
list_length(list *l)
{
  uint len = 0;
  node *n;

  WALK_LIST(n, *l)
    len++;

  return len;
}
Loading