From f59c2ccf281e12e63f0fd78f5f52aa584613aba7 Mon Sep 17 00:00:00 2001 From: millert Date: Sat, 24 Sep 2022 17:08:32 +0000 Subject: [PATCH] ascii_load_sockaddr: Remove old IPv6 address parsing for envelope files. IPv6 addresses have been formatted as "[address]" in envelope files for years. This was supposed to be removed after the 6.6 release but got forgotten. Noticed by kn@, OK deraadt@ kn@ --- usr.sbin/smtpd/envelope.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/usr.sbin/smtpd/envelope.c b/usr.sbin/smtpd/envelope.c index f2507f3f520..f522faf44d3 100644 --- a/usr.sbin/smtpd/envelope.c +++ b/usr.sbin/smtpd/envelope.c @@ -1,4 +1,4 @@ -/* $OpenBSD: envelope.c,v 1.49 2021/06/14 17:58:15 eric Exp $ */ +/* $OpenBSD: envelope.c,v 1.50 2022/09/24 17:08:32 millert Exp $ */ /* * Copyright (c) 2013 Eric Faurot @@ -279,14 +279,6 @@ ascii_load_sockaddr(struct sockaddr_storage *ss, char *buf) if (!strcmp("local", buf)) { ss->ss_family = AF_LOCAL; } - else if (strncasecmp("IPv6:", buf, 5) == 0) { - /* XXX - remove this after 6.6 release */ - if (inet_pton(AF_INET6, buf + 5, &ssin6.sin6_addr) != 1) - return 0; - ssin6.sin6_family = AF_INET6; - memcpy(ss, &ssin6, sizeof(ssin6)); - ss->ss_len = sizeof(struct sockaddr_in6); - } else if (buf[0] == '[' && buf[strlen(buf)-1] == ']') { buf[strlen(buf)-1] = '\0'; if (inet_pton(AF_INET6, buf+1, &ssin6.sin6_addr) != 1) -- 2.20.1