From: Claudio Jeker Subject: Re: dvmrpd(8): Mechanically change inet_aton to inet_pton. To: tech Date: Wed, 21 Aug 2024 10:37:20 +0200 On Wed, Aug 21, 2024 at 10:28:56AM +0200, Florian Obser wrote: > OK? Sure. > diff --git igmp.c igmp.c > index c1c2b93c10d..e3328a04372 100644 > --- igmp.c > +++ igmp.c > @@ -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 interface.c interface.c > index 33156463fa9..ee7ef494562 100644 > --- interface.c > +++ interface.c > @@ -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 packet.c packet.c > index f0b22d6eff9..04f280ab5f3 100644 > --- packet.c > +++ packet.c > @@ -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 probe.c probe.c > index 6a8d32a84a9..bbe3cf1add0 100644 > --- probe.c > +++ probe.c > @@ -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 report.c report.c > index cc8ed3a3c07..5315565d9e0 100644 > --- report.c > +++ report.c > @@ -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)) { > > -- > In my defence, I have been left unsupervised. > -- :wq Claudio