[PATCH usteer] usteer: add support for IPv6 remote exchange

Daniel Golle daniel at makrotopia.org
Tue Sep 7 12:15:01 PDT 2021


On Tue, Sep 07, 2021 at 08:53:59PM +0200, David Bauer wrote:
> From: Jan Braun <keksgesicht23 at gmail.com>
> 
> This adds optional support for message exchange using IPv6 multicast
> messaging. This has the ability for routers and switches between nodes
> to route traffic between usteer nodes multicast-aware.
> 
> By default, IPv4 is used. IPv6 can be enabled by configuring the ipv6
> option to 1.
> 
> Signed-off-by: Jan Braun <keksgesicht23 at gmail.com>
> [squash commits - adapt usock usage]
> Signed-off-by: David Bauer <mail at david-bauer.net>
> ---
> ...
> diff --git a/usteer.h b/usteer.h
> index 749075e..4ed3b95 100644
> --- a/usteer.h
> +++ b/usteer.h
> @@ -33,6 +33,9 @@
>  
>  #define __STR(x)		#x
>  #define _STR(x)			__STR(x)
> +
> +#define APMGR_V6_MCAST_GROUP	"ff02::4321"

Why not use a more expressive multicast address?
Similar to the port

16720 == 0x4150 == 'A' << 8 | 'P'

we can do better than 4321 ;)
As IPv6 is notated as hexadecimals, 4150 would be a good choice.


> +
>  #define APMGR_PORT		16720 /* AP */
>  #define APMGR_PORT_STR		_STR(APMGR_PORT)
>  #define APMGR_BUFLEN		(64 * 1024)
> @@ -122,6 +125,8 @@ struct usteer_config {
>  	bool syslog;
>  	uint32_t debug_level;
>  
> +	bool ipv6;
> +
>  	uint32_t sta_block_timeout;
>  	uint32_t local_sta_timeout;
>  	uint32_t local_sta_update;
> -- 
> 2.33.0
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list