Index | Thread | Search

From:
Claudio Jeker <cjeker@diehard.n-r-g.com>
Subject:
Re: ripd(8): Mechanically change inet_aton to inet_pton.
To:
tech <tech@openbsd.org>
Date:
Wed, 21 Aug 2024 13:59:23 +0200

Download raw body.

Thread
On Wed, Aug 21, 2024 at 01:25:08PM +0200, Florian Obser wrote:
> OK?

Ok claudio@
 
> diff --git interface.c interface.c
> index 3d1dfd611bc..ae4fa5850a0 100644
> --- interface.c
> +++ interface.c
> @@ -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);
> diff --git message.c message.c
> index 423ef0ff460..60f30785f0e 100644
> --- message.c
> +++ message.c
> @@ -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);
>  	}
>  
> 
> -- 
> In my defence, I have been left unsupervised.
> 

-- 
:wq Claudio