diff options
-rw-r--r-- | usr.sbin/bgpd/session.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c index 1c383e21ef9..d0f2184e976 100644 --- a/usr.sbin/bgpd/session.c +++ b/usr.sbin/bgpd/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.193 2004/09/22 08:46:28 henning Exp $ */ +/* $OpenBSD: session.c,v 1.194 2004/10/05 11:47:41 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -1697,15 +1697,15 @@ parse_open(struct peer *peer) memcpy(&bgpid, p, sizeof(bgpid)); p += sizeof(bgpid); - /* check bgpid for validity, must be a valid ip address - HOW? */ - /* if ( bgpid invalid ) { + /* check bgpid for validity - just disallow 0 */ + if (ntohl(bgpid) == 0) { log_peer_warnx(&peer->conf, "peer BGPID %lu unacceptable", ntohl(bgpid)); session_notification(peer, ERR_OPEN, ERR_OPEN_BGPID, NULL, 0); change_state(peer, STATE_IDLE, EVNT_RCVD_OPEN); return (-1); - } */ + } peer->remote_bgpid = bgpid; memcpy(&optparamlen, p, sizeof(optparamlen)); |