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

usr.sbin/ripd/interface.c
usr.sbin/ripd/message.c

index 3d1dfd6..019e2c3 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: interface.c,v 1.16 2021/01/19 10:09:59 claudio Exp $ */
+/*     $OpenBSD: interface.c,v 1.17 2024/08/21 14:58:14 florian Exp $ */
 
 /*
  * Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it>
@@ -192,7 +192,7 @@ if_act_start(struct iface *iface)
        switch (iface->type) {
        case IF_TYPE_POINTOPOINT:
        case IF_TYPE_BROADCAST:
-               inet_aton(ALL_RIP_ROUTERS, &addr);
+               inet_pton(AF_INET, ALL_RIP_ROUTERS, &addr);
                if (if_join_group(iface, &addr)) {
                        log_warn("if_act_start: error joining group %s, "
                            "interface %s", inet_ntoa(addr), iface->name);
@@ -220,7 +220,7 @@ if_act_reset(struct iface *iface)
        switch (iface->type) {
        case IF_TYPE_POINTOPOINT:
        case IF_TYPE_BROADCAST:
-               inet_aton(ALL_RIP_ROUTERS, &addr);
+               inet_pton(AF_INET, ALL_RIP_ROUTERS, &addr);
                if (if_leave_group(iface, &addr)) {
                log_warn("if_act_reset: error leaving group %s, "
                    "interface %s", inet_ntoa(addr), iface->name);
index 423ef0f..21cf3f5 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: message.c,v 1.17 2023/07/03 10:34:08 claudio Exp $ */
+/*     $OpenBSD: message.c,v 1.18 2024/08/21 14:58:14 florian Exp $ */
 
 /*
  * Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it>
@@ -107,7 +107,7 @@ send_triggered_update(struct iface *iface, struct rip_route *rr)
        if (iface->passive)
                return (0);
 
-       inet_aton(ALL_RIP_ROUTERS, &dst.sin_addr);
+       inet_pton(AF_INET, ALL_RIP_ROUTERS, &dst.sin_addr);
 
        dst.sin_port = htons(RIP_PORT);
        dst.sin_family = AF_INET;
@@ -161,7 +161,7 @@ send_request(struct packet_head *r_list, struct iface *i, struct nbr *nbr)
        } else {
                /* multicast on interface */
                iface = i;
-               inet_aton(ALL_RIP_ROUTERS, &dst.sin_addr);
+               inet_pton(AF_INET, ALL_RIP_ROUTERS, &dst.sin_addr);
                port = htons(RIP_PORT);
        }
 
@@ -237,7 +237,7 @@ send_response(struct packet_head *r_list, struct iface *i, struct nbr *nbr)
        } else {
                /* multicast on interface */
                iface = i;
-               inet_aton(ALL_RIP_ROUTERS, &dst.sin_addr);
+               inet_pton(AF_INET, ALL_RIP_ROUTERS, &dst.sin_addr);
                port = htons(RIP_PORT);
        }