Mechanically change inet_aton to inet_pton.
authorflorian <florian@openbsd.org>
Wed, 21 Aug 2024 09:18:47 +0000 (09:18 +0000)
committerflorian <florian@openbsd.org>
Wed, 21 Aug 2024 09:18:47 +0000 (09:18 +0000)
OK claudio

usr.sbin/dvmrpd/igmp.c
usr.sbin/dvmrpd/interface.c
usr.sbin/dvmrpd/packet.c
usr.sbin/dvmrpd/probe.c
usr.sbin/dvmrpd/report.c

index c1c2b93..5b3fd24 100644 (file)
@@ -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 <norby@openbsd.org>
@@ -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);
index 3315646..e4c4824 100644 (file)
@@ -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 <claudio@openbsd.org>
@@ -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);
index f0b22d6..381cd30 100644 (file)
@@ -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 <norby@openbsd.org>
@@ -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"
index 6a8d32a..4046dd3 100644 (file)
@@ -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 <norby@openbsd.org>
@@ -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);
index cc8ed3a..b961a52 100644 (file)
@@ -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 <norby@openbsd.org>
@@ -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)) {