diff --git a/component/open62541/buildout.cfg b/component/open62541/buildout.cfg index eb6fe1985c4f8582be08bd14697bf615c9b037ad..9161d7c144a8e6d70bb37ab609e343559b5f52e0 100644 --- a/component/open62541/buildout.cfg +++ b/component/open62541/buildout.cfg @@ -4,12 +4,16 @@ parts = open62541 extends = ../cmake/buildout.cfg + ../patch/buildout.cfg [open62541] recipe = slapos.recipe.cmmi shared = true url = https://github.com/open62541/open62541/archive/refs/heads/pack/v1.3.zip md5sum = c2e9938f082b027110fba538de76684c +patch-options = -p1 +patches = + ${:_profile_base_location_}/ipv6_bugfix.patch#355bec02adee4ea73ff5a56ba6971ad2 configure-command = ${cmake:location}/bin/cmake configure-options = @@ -21,3 +25,5 @@ configure-options = -DUA_NAMESPACE_ZERO=REDUCED post-install = cp src/pubsub/*.h deps/open62541_queue.h @@LOCATION@@/include +environement = + PATH=${patch:location}/bin:%(PATH)s diff --git a/component/open62541/ipv6_bugfix.patch b/component/open62541/ipv6_bugfix.patch new file mode 100644 index 0000000000000000000000000000000000000000..2f176eabbecf1b803a297033ffbc2c76092d4cf8 --- /dev/null +++ b/component/open62541/ipv6_bugfix.patch @@ -0,0 +1,27 @@ +commit ccdde2eddfd2e0937ba0b452063c60c214f5f2f5 (HEAD -> master) +Author: Thomas Gambier <thomas.gambier@nexedi.com> +Date: Sat May 28 19:18:02 2022 +0200 + + BUGFIX: UA_PubSubChannelUDPMC_regist supports different interface in IPv6 + +diff --git a/plugins/ua_pubsub_udp.c b/plugins/ua_pubsub_udp.c +index 2c6ea480..f66f5860 100644 +--- a/plugins/ua_pubsub_udp.c ++++ b/plugins/ua_pubsub_udp.c +@@ -319,6 +319,7 @@ UA_PubSubChannelUDPMC_open(const UA_PubSubConnectionConfig *connectionConfig) { + "Interface configuration preparation failed."); + goto cleanup; + } ++ memcpy(&channelDataUDPMC->intf_addr, &group.ipv6.ipv6mr_interface, sizeof(group.ipv6.ipv6mr_interface)); + } + #endif + } +@@ -432,6 +433,7 @@ UA_PubSubChannelUDPMC_regist(UA_PubSubChannel *channel, UA_ExtensionObject *tran + memcpy(&groupV6.ipv6mr_multiaddr, + &((const struct sockaddr_in6 *) &connectionConfig->ai_addr)->sin6_addr, + sizeof(struct in6_addr)); ++ memcpy(&groupV6.ipv6mr_interface, &connectionConfig->intf_addr, sizeof(int)); + + if(UA_setsockopt(channel->sockfd, + connectionConfig->ai_family == PF_INET6 ? IPPROTO_IPV6 : IPPROTO_IP, +