summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2021-01-05 10:02:45 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2021-01-05 10:02:45 +0000
commit9315669cfa803bcc285de26b56c529e556caa98a (patch)
tree892cad1b2ab454a786eef84d707eeb9ac5b4ed52 /usr.sbin/bgpd
parentb098d15a1e9d33a474a3deeaa8ed6b6fe1197c57 (diff)
It is safe to call addr2sa with a bgpd_addr NULL pointer
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r--usr.sbin/bgpd/session.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c
index c0406c71b62..93db42d13b2 100644
--- a/usr.sbin/bgpd/session.c
+++ b/usr.sbin/bgpd/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.409 2020/12/30 07:29:56 claudio Exp $ */
+/* $OpenBSD: session.c,v 1.410 2021/01/05 10:02:44 claudio Exp $ */
/*
* Copyright (c) 2003, 2004, 2005 Henning Brauer <henning@openbsd.org>
@@ -1086,7 +1086,7 @@ session_connect(struct peer *peer)
bind_addr = &peer->conf.local_addr_v6;
break;
}
- if (bind_addr && (sa = addr2sa(bind_addr, 0, &sa_len)) != NULL) {
+ if ((sa = addr2sa(bind_addr, 0, &sa_len)) != NULL) {
if (bind(peer->fd, sa, sa_len) == -1) {
log_peer_warn(&peer->conf, "session_connect bind");
bgp_fsm(peer, EVNT_CON_OPENFAIL);