diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2023-06-14 14:09:30 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2023-06-14 14:09:30 +0000 |
commit | ebe4ca5fd1d243556dcbd54b076915e876e6606e (patch) | |
tree | 425eaca53f99b18712c3ee66a9178ed36ef299c2 /sbin/iked/parse.y | |
parent | 7e0a05ef5350783f510d3dbfdc54f7538b5f5297 (diff) |
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@
Diffstat (limited to 'sbin/iked/parse.y')
-rw-r--r-- | sbin/iked/parse.y | 5 |
1 files changed, 2 insertions, 3 deletions
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 <tobias.heider@stusta.de> @@ -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) { |