Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

WIP: UDP6 Fixes/Improvements #272

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

ajlennon
Copy link

@ajlennon ajlennon commented Aug 1, 2023

  • Fix DEBUG_NW() error with UDP6 support
  • Add destination port to UDP6 address logging
  • UDP6 multicast port was never being set

I am a bit unclear about the UDP6 multicast port as it's used for local binding and there seems to be an assumption that the same value should be used for remote port but I don't believe it was ever set.

Signed-off-by: Alex J Lennon <ajlennon@dynamicdevices.co.uk>
Signed-off-by: Alex J Lennon <ajlennon@dynamicdevices.co.uk>
There are some oddities about the gateway.conf UDP6
multicast port in that it is used both for local port
and remote port

Signed-off-by: Alex J Lennon <ajlennon@dynamicdevices.co.uk>
@ajlennon ajlennon closed this Aug 1, 2023
@ajlennon
Copy link
Author

ajlennon commented Aug 1, 2023

I see the port is supposed to be set from the string but it seems to be set incorrectly

@ajlennon ajlennon reopened this Aug 1, 2023
@ajlennon
Copy link
Author

ajlennon commented Aug 1, 2023

I've probably not fixed this the right way. The problem seems to be the UDP6

void SensorNetAddress::setAddress(struct sockaddr_in6 *IpAddr)

is called not

int SensorNetAddress::setAddress(string* data)

And thus the port isn't bring set (?)

@ajlennon ajlennon changed the title UDP6 Fixes/Improvements WIP: UDP6 Fixes/Improvements Aug 1, 2023
@ajlennon ajlennon marked this pull request as draft August 1, 2023 22:23
Signed-off-by: Alex J Lennon <ajlennon@dynamicdevices.co.uk>
Signed-off-by: Alex J Lennon <ajlennon@dynamicdevices.co.uk>
Previously the UDP6 multicast wasn't working. I've taken code from

https://github.com/kyberpunk/paho.mqtt-sn.embedded-c/blob/master/MQTTSNGateway/src/linux/udp6/SensorNetwork.cpp

This seems to fix the issue for me although I'm not entirely clear
what's different in terms of addressing

Signed-off-by: Alex J Lennon <ajlennon@dynamicdevices.co.uk>
@ajlennon ajlennon force-pushed the ajl/fix-debug-ipv6-addr-output branch from d0b4fb5 to bd99ee2 Compare August 2, 2023 13:49
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant