summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/bgpd/rde.c14
-rw-r--r--usr.sbin/bgpd/rde_attr.c8
2 files changed, 11 insertions, 11 deletions
diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c
index 09ccca1d1f5..fe35ae8ddee 100644
--- a/usr.sbin/bgpd/rde.c
+++ b/usr.sbin/bgpd/rde.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde.c,v 1.336 2015/08/04 14:46:38 phessler Exp $ */
+/* $OpenBSD: rde.c,v 1.337 2015/08/30 23:20:43 deraadt Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -1362,7 +1362,7 @@ rde_attr_parse(u_char *p, u_int16_t len, struct rde_peer *peer,
struct bgpd_addr nexthop;
u_char *op = p, *npath;
u_int32_t tmp32;
- int err;
+ int error;
u_int16_t attr_len, nlen;
u_int16_t plen = 0;
u_int8_t flags;
@@ -1423,8 +1423,8 @@ bad_flags:
case ATTR_ASPATH:
if (!CHECK_FLAGS(flags, ATTR_WELL_KNOWN, 0))
goto bad_flags;
- err = aspath_verify(p, attr_len, rde_as4byte(peer));
- if (err == AS_ERR_SOFT) {
+ error = aspath_verify(p, attr_len, rde_as4byte(peer));
+ if (error == AS_ERR_SOFT) {
/*
* soft errors like unexpected segment types are
* not considered fatal and the path is just
@@ -1433,7 +1433,7 @@ bad_flags:
a->flags |= F_ATTR_PARSE_ERR;
log_peer_warnx(&peer->conf, "bad ASPATH, "
"path invalidated and prefix withdrawn");
- } else if (err != 0) {
+ } else if (error != 0) {
rde_update_err(peer, ERR_UPDATE, ERR_UPD_ASPATH,
NULL, 0);
return (-1);
@@ -1640,7 +1640,7 @@ bad_flags:
if (!CHECK_FLAGS(flags, ATTR_OPTIONAL|ATTR_TRANSITIVE,
ATTR_PARTIAL))
goto bad_flags;
- if ((err = aspath_verify(p, attr_len, 1)) != 0) {
+ if ((error = aspath_verify(p, attr_len, 1)) != 0) {
/*
* XXX RFC does not specify how to handle errors.
* XXX Instead of dropping the session because of a
@@ -1652,7 +1652,7 @@ bad_flags:
* XXX by looking at the partial bit.
* XXX Consider soft errors similar to a partial attr.
*/
- if (flags & ATTR_PARTIAL || err == AS_ERR_SOFT) {
+ if (flags & ATTR_PARTIAL || error == AS_ERR_SOFT) {
a->flags |= F_ATTR_PARSE_ERR;
log_peer_warnx(&peer->conf, "bad AS4_PATH, "
"path invalidated and prefix withdrawn");
diff --git a/usr.sbin/bgpd/rde_attr.c b/usr.sbin/bgpd/rde_attr.c
index 3f0c29b6386..b69ff0c534b 100644
--- a/usr.sbin/bgpd/rde_attr.c
+++ b/usr.sbin/bgpd/rde_attr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_attr.c,v 1.93 2014/12/12 18:15:51 tedu Exp $ */
+/* $OpenBSD: rde_attr.c,v 1.94 2015/08/30 23:20:43 deraadt Exp $ */
/*
* Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org>
@@ -423,7 +423,7 @@ aspath_verify(void *data, u_int16_t len, int as4byte)
u_int8_t *seg = data;
u_int16_t seg_size, as_size = 2;
u_int8_t seg_len, seg_type;
- int err = 0;
+ int error = 0;
if (len & 1)
/* odd length aspath are invalid */
@@ -444,7 +444,7 @@ aspath_verify(void *data, u_int16_t len, int as4byte)
* bgp session running.
*/
if (seg_type == AS_CONFED_SEQUENCE || seg_type == AS_CONFED_SET)
- err = AS_ERR_SOFT;
+ error = AS_ERR_SOFT;
if (seg_type != AS_SET && seg_type != AS_SEQUENCE &&
seg_type != AS_CONFED_SEQUENCE && seg_type != AS_CONFED_SET)
return (AS_ERR_TYPE);
@@ -458,7 +458,7 @@ aspath_verify(void *data, u_int16_t len, int as4byte)
/* empty aspath segments are not allowed */
return (AS_ERR_BAD);
}
- return (err); /* aspath is valid but probably not loop free */
+ return (error); /* aspath is valid but probably not loop free */
}
void