From: florian Date: Wed, 21 Aug 2024 09:18:47 +0000 (+0000) Subject: Mechanically change inet_aton to inet_pton. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=2471dd62a768823e91c9f0fa6ba98a94d7370bc9;p=openbsd Mechanically change inet_aton to inet_pton. OK claudio --- diff --git a/usr.sbin/dvmrpd/igmp.c b/usr.sbin/dvmrpd/igmp.c index c1c2b93c10d..5b3fd244685 100644 --- a/usr.sbin/dvmrpd/igmp.c +++ b/usr.sbin/dvmrpd/igmp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: igmp.c,v 1.5 2023/06/26 10:08:56 claudio Exp $ */ +/* $OpenBSD: igmp.c,v 1.6 2024/08/21 09:18:47 florian Exp $ */ /* * Copyright (c) 2005, 2006 Esben Norby @@ -78,7 +78,7 @@ send_igmp_query(struct iface *iface, struct group *group) /* set destination address */ dst.sin_family = AF_INET; dst.sin_len = sizeof(struct sockaddr_in); - inet_aton(AllSystems, &dst.sin_addr); + inet_pton(AF_INET, AllSystems, &dst.sin_addr); ret = send_packet(iface, buf, &dst); ibuf_free(buf); diff --git a/usr.sbin/dvmrpd/interface.c b/usr.sbin/dvmrpd/interface.c index 33156463fa9..e4c4824ef7d 100644 --- a/usr.sbin/dvmrpd/interface.c +++ b/usr.sbin/dvmrpd/interface.c @@ -1,4 +1,4 @@ -/* $OpenBSD: interface.c,v 1.12 2019/06/28 13:32:47 deraadt Exp $ */ +/* $OpenBSD: interface.c,v 1.13 2024/08/21 09:18:47 florian Exp $ */ /* * Copyright (c) 2005 Claudio Jeker @@ -396,19 +396,19 @@ if_act_start(struct iface *iface) switch (iface->type) { case IF_TYPE_POINTOPOINT: case IF_TYPE_BROADCAST: - inet_aton(AllSystems, &addr); + inet_pton(AF_INET, AllSystems, &addr); if (if_join_group(iface, &addr)) { log_warnx("if_act_start: error joining group %s, " "interface %s", inet_ntoa(addr), iface->name); return (-1); } - inet_aton(AllRouters, &addr); + inet_pton(AF_INET, AllRouters, &addr); if (if_join_group(iface, &addr)) { log_warnx("if_act_start: error joining group %s, " "interface %s", inet_ntoa(addr), iface->name); return (-1); } - inet_aton(AllDVMRPRouters, &addr); + inet_pton(AF_INET, AllDVMRPRouters, &addr); if (if_join_group(iface, &addr)) { log_warnx("if_act_start: error joining group %s, " "interface %s", inet_ntoa(addr), iface->name); @@ -455,19 +455,19 @@ if_act_reset(struct iface *iface) switch (iface->type) { case IF_TYPE_POINTOPOINT: case IF_TYPE_BROADCAST: - inet_aton(AllSystems, &addr); + inet_pton(AF_INET, AllSystems, &addr); if (if_leave_group(iface, &addr)) { log_warnx("if_act_reset: error leaving group %s, " "interface %s", inet_ntoa(addr), iface->name); return (-1); } - inet_aton(AllRouters, &addr); + inet_pton(AF_INET, AllRouters, &addr); if (if_leave_group(iface, &addr)) { log_warnx("if_act_reset: error leaving group %s, " "interface %s", inet_ntoa(addr), iface->name); return (-1); } - inet_aton(AllDVMRPRouters, &addr); + inet_pton(AF_INET, AllDVMRPRouters, &addr); if (if_leave_group(iface, &addr)) { log_warnx("if_act_reset: error leaving group %s, " "interface %s", inet_ntoa(addr), iface->name); diff --git a/usr.sbin/dvmrpd/packet.c b/usr.sbin/dvmrpd/packet.c index f0b22d6eff9..381cd30c27d 100644 --- a/usr.sbin/dvmrpd/packet.c +++ b/usr.sbin/dvmrpd/packet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: packet.c,v 1.8 2023/06/26 10:08:56 claudio Exp $ */ +/* $OpenBSD: packet.c,v 1.9 2024/08/21 09:18:47 florian Exp $ */ /* * Copyright (c) 2004, 2005, 2006 Esben Norby @@ -189,7 +189,7 @@ recv_packet(int fd, short event, void *bula) buf += sizeof(*dvmrp_hdr); len = l - sizeof(*dvmrp_hdr); - inet_aton(AllDVMRPRouters, &addr); + inet_pton(AF_INET, AllDVMRPRouters, &addr); if ((ip_hdr.ip_dst.s_addr != addr.s_addr) && (ip_hdr.ip_dst.s_addr != iface->addr.s_addr)) { log_debug("recv_packet: interface %s, invalid" diff --git a/usr.sbin/dvmrpd/probe.c b/usr.sbin/dvmrpd/probe.c index 6a8d32a84a9..4046dd3981e 100644 --- a/usr.sbin/dvmrpd/probe.c +++ b/usr.sbin/dvmrpd/probe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: probe.c,v 1.6 2024/04/23 13:34:51 jsg Exp $ */ +/* $OpenBSD: probe.c,v 1.7 2024/08/21 09:18:47 florian Exp $ */ /* * Copyright (c) 2005, 2006 Esben Norby @@ -64,7 +64,7 @@ send_probe(struct iface *iface) /* set destination address */ dst.sin_family = AF_INET; dst.sin_len = sizeof(struct sockaddr_in); - inet_aton(AllDVMRPRouters, &dst.sin_addr); + inet_pton(AF_INET, AllDVMRPRouters, &dst.sin_addr); ret = send_packet(iface, buf, &dst); ibuf_free(buf); diff --git a/usr.sbin/dvmrpd/report.c b/usr.sbin/dvmrpd/report.c index cc8ed3a3c07..b961a528562 100644 --- a/usr.sbin/dvmrpd/report.c +++ b/usr.sbin/dvmrpd/report.c @@ -1,4 +1,4 @@ -/* $OpenBSD: report.c,v 1.12 2023/06/26 10:08:56 claudio Exp $ */ +/* $OpenBSD: report.c,v 1.13 2024/08/21 09:18:47 florian Exp $ */ /* * Copyright (c) 2005, 2006 Esben Norby @@ -233,7 +233,7 @@ rr_list_send(struct rr_head *rr_list, struct iface *xiface, struct nbr *nbr) } else { /* multicast on interface */ iface = xiface; - inet_aton(AllDVMRPRouters, &addr); + inet_pton(AF_INET, AllDVMRPRouters, &addr); } while (!TAILQ_EMPTY(rr_list)) {