-/* $OpenBSD: rde.c,v 1.606 2023/06/12 12:48:07 claudio Exp $ */
+/* $OpenBSD: rde.c,v 1.607 2023/07/12 12:31:28 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
goto bad_flags;
if (peer->conf.ebgp) {
/* ignore local-pref attr on non ibgp peers */
- plen += 4;
+ plen += attr_len;
break;
}
if (a->flags & F_ATTR_LOCALPREF)
* RFC 7606
*/
log_peer_warnx(&peer->conf, "bad AGGREGATOR, "
- "partial attribute ignored");
+ "attribute discarded");
plen += attr_len;
break;
}
a->flags |= F_ATTR_PARSE_ERR;
log_peer_warnx(&peer->conf, "bad COMMUNITIES, "
"path invalidated and prefix withdrawn");
- break;
}
plen += attr_len;
break;
a->flags |= F_ATTR_PARSE_ERR;
log_peer_warnx(&peer->conf, "bad LARGE COMMUNITIES, "
"path invalidated and prefix withdrawn");
- break;
}
plen += attr_len;
break;
a->flags |= F_ATTR_PARSE_ERR;
log_peer_warnx(&peer->conf, "bad EXT_COMMUNITIES, "
"path invalidated and prefix withdrawn");
- break;
}
plen += attr_len;
break;
case ATTR_AS4_AGGREGATOR:
if (attr_len != 8) {
/* see ATTR_AGGREGATOR ... */
- if ((flags & ATTR_PARTIAL) == 0)
- goto bad_len;
log_peer_warnx(&peer->conf, "bad AS4_AGGREGATOR, "
- "partial attribute ignored");
+ "attribute discarded");
plen += attr_len;
break;
}
a->flags |= F_ATTR_PARSE_ERR;
log_peer_warnx(&peer->conf, "bad OTC, "
"path invalidated and prefix withdrawn");
+ plen += attr_len;
break;
}
if (!CHECK_FLAGS(flags, ATTR_OPTIONAL|ATTR_TRANSITIVE,