Commit ade5c528 authored by Léo-Paul Géneau's avatar Léo-Paul Géneau 👾

component/open62541: add patch to bugfix IPv6

parent a44b5065
...@@ -4,12 +4,16 @@ ...@@ -4,12 +4,16 @@
parts = open62541 parts = open62541
extends = extends =
../cmake/buildout.cfg ../cmake/buildout.cfg
../patch/buildout.cfg
[open62541] [open62541]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true shared = true
url = https://github.com/open62541/open62541/archive/refs/heads/pack/v1.3.zip url = https://github.com/open62541/open62541/archive/refs/heads/pack/v1.3.zip
md5sum = c2e9938f082b027110fba538de76684c md5sum = c2e9938f082b027110fba538de76684c
patch-options = -p1
patches =
${:_profile_base_location_}/ipv6_bugfix.patch#355bec02adee4ea73ff5a56ba6971ad2
configure-command = configure-command =
${cmake:location}/bin/cmake ${cmake:location}/bin/cmake
configure-options = configure-options =
...@@ -21,3 +25,5 @@ configure-options = ...@@ -21,3 +25,5 @@ configure-options =
-DUA_NAMESPACE_ZERO=REDUCED -DUA_NAMESPACE_ZERO=REDUCED
post-install = post-install =
cp src/pubsub/*.h deps/open62541_queue.h @@LOCATION@@/include cp src/pubsub/*.h deps/open62541_queue.h @@LOCATION@@/include
environement =
PATH=${patch:location}/bin:%(PATH)s
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,
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment