From 606cbe93de42cac7de618119fc26fbf7340e2cf8 Mon Sep 17 00:00:00 2001 From: Henning Brauer Date: Fri, 16 Apr 2004 04:51:10 +0000 Subject: use getpeerbyaddr() instead of using the v4 part of the af independent struct manually --- usr.sbin/bgpd/control.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'usr.sbin/bgpd') diff --git a/usr.sbin/bgpd/control.c b/usr.sbin/bgpd/control.c index 785bbd81f08..72db4f67745 100644 --- a/usr.sbin/bgpd/control.c +++ b/usr.sbin/bgpd/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.26 2004/03/17 14:39:45 henning Exp $ */ +/* $OpenBSD: control.c,v 1.27 2004/04/16 04:51:09 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -216,7 +216,7 @@ control_dispatch_msg(struct pollfd *pfd, int i) if (imsg.hdr.len == IMSG_HEADER_SIZE + sizeof(struct bgpd_addr)) { addr = imsg.data; - p = getpeerbyip(addr->v4.s_addr); + p = getpeerbyaddr(addr); if (p != NULL) imsg_compose(&c->ibuf, IMSG_CTL_SHOW_NEIGHBOR, @@ -237,7 +237,7 @@ control_dispatch_msg(struct pollfd *pfd, int i) if (imsg.hdr.len == IMSG_HEADER_SIZE + sizeof(struct bgpd_addr)) { addr = imsg.data; - p = getpeerbyip(addr->v4.s_addr); + p = getpeerbyaddr(addr); if (p != NULL) bgp_fsm(p, EVNT_START); else @@ -251,7 +251,7 @@ control_dispatch_msg(struct pollfd *pfd, int i) if (imsg.hdr.len == IMSG_HEADER_SIZE + sizeof(struct bgpd_addr)) { addr = imsg.data; - p = getpeerbyip(addr->v4.s_addr); + p = getpeerbyaddr(addr); if (p != NULL) bgp_fsm(p, EVNT_STOP); else -- cgit v1.2.3