~brightbox/bird/debian-packaging

« back to all changes in this revision

Viewing changes to proto/bgp/attrs.c

  • Committer: Ondřej Surý
  • Date: 2013-11-25 14:59:24 UTC
  • Revision ID: git-v1:a3c058b8752bd98df2231ac88d94931fdb4e0c65
New upstream version 1.4.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
950
950
static inline int
951
951
bgp_as_path_loopy(struct bgp_proto *p, rta *a)
952
952
{
 
953
  int num = p->cf->allow_local_as + 1;
953
954
  eattr *e = ea_find(a->eattrs, EA_CODE(EAP_BGP, BA_AS_PATH));
954
 
  return (e && as_path_is_member(e->u.ptr, p->local_as));
 
955
  return (e && (num > 0) && as_path_contains(e->u.ptr, p->local_as, num));
955
956
}
956
957
 
957
958
static inline int