summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd
diff options
context:
space:
mode:
authordenis <denis@cvs.openbsd.org>2018-12-28 14:28:53 +0000
committerdenis <denis@cvs.openbsd.org>2018-12-28 14:28:53 +0000
commita0c6ee99b9e2e050adba86130c08b9d6e074bbe7 (patch)
tree884fa38281516d04bafb4f1115a86a16b81b7206 /usr.sbin/bgpd
parent600c795e13a7163026bfae6ff00cf431e99a2b72 (diff)
set conf.capabilities.mp to 0 by default
OK claudio@
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r--usr.sbin/bgpd/parse.y17
1 files changed, 4 insertions, 13 deletions
diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y
index 984a1639300..7a2a78accd3 100644
--- a/usr.sbin/bgpd/parse.y
+++ b/usr.sbin/bgpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.366 2018/12/19 15:26:42 claudio Exp $ */
+/* $OpenBSD: parse.y,v 1.367 2018/12/28 14:28:52 denis Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -1192,10 +1192,8 @@ neighbor : { curpeer = new_peer(); }
if (($3.prefix.aid == AID_INET && $3.len != 32) ||
($3.prefix.aid == AID_INET6 && $3.len != 128))
curpeer->conf.template = 1;
- if (curpeer->conf.capabilities.mp[
- curpeer->conf.remote_addr.aid] == -1)
- curpeer->conf.capabilities.mp[
- curpeer->conf.remote_addr.aid] = 1;
+ curpeer->conf.capabilities.mp[
+ curpeer->conf.remote_addr.aid] = 1;
if (get_id(curpeer)) {
yyerror("get_id failed");
YYERROR;
@@ -3761,7 +3759,7 @@ alloc_peer(void)
p->conf.export_type = EXPORT_UNSET;
p->conf.announce_capa = 1;
for (i = 0; i < AID_MAX; i++)
- p->conf.capabilities.mp[i] = -1;
+ p->conf.capabilities.mp[i] = 0;
p->conf.capabilities.refresh = 1;
p->conf.capabilities.grestart.restart = 1;
p->conf.capabilities.as4byte = 1;
@@ -4143,8 +4141,6 @@ str2key(char *s, char *dest, size_t max_len)
int
neighbor_consistent(struct peer *p)
{
- u_int8_t i;
-
/* local-address and peer's address: same address family */
if (p->conf.local_addr.aid &&
p->conf.local_addr.aid != p->conf.remote_addr.aid) {
@@ -4198,11 +4194,6 @@ neighbor_consistent(struct peer *p)
return (-1);
}
- /* the default MP capability is NONE */
- for (i = 0; i < AID_MAX; i++)
- if (p->conf.capabilities.mp[i] == -1)
- p->conf.capabilities.mp[i] = 0;
-
return (0);
}