From ebe4ca5fd1d243556dcbd54b076915e876e6606e Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Wed, 14 Jun 2023 14:09:30 +0000 Subject: Replace the last few print_host() calls with print_addr() ones. In most cases print_host(addr, buf, buflen) can be replaced with strlcpy(buf, print_addr(addr), buflen). Some code was never fully adjusted to the full power of print_host() and there are remnants of times well before print_host() supported multiple internal buffers. With and OK tb@ --- sbin/iked/parse.y | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sbin/iked/parse.y') diff --git a/sbin/iked/parse.y b/sbin/iked/parse.y index 6eebe018e55..075981db320 100644 --- a/sbin/iked/parse.y +++ b/sbin/iked/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.142 2023/04/19 13:33:37 jsg Exp $ */ +/* $OpenBSD: parse.y,v 1.143 2023/06/14 14:09:29 claudio Exp $ */ /* * Copyright (c) 2019 Tobias Heider @@ -2880,8 +2880,7 @@ create_ike(char *name, int af, struct ipsec_addr_wrap *ipproto, if (dstid) strlcpy(idstr, dstid, sizeof(idstr)); else if (!pol.pol_peer.addr_net) - print_host((struct sockaddr *)&pol.pol_peer.addr, idstr, - sizeof(idstr)); + strlcpy(idstr, print_addr(&pol.pol_peer.addr), sizeof(idstr)); ikeauth = &pol.pol_auth; switch (ikeauth->auth_method) { -- cgit v1.2.3