Skip to content

Conversation

@pablogs9
Copy link
Member

No description provided.

@pablogs9
Copy link
Member Author

@mergify backport iron humble

@mergify
Copy link
Contributor

mergify bot commented Feb 27, 2025

backport iron humble

✅ Backports have been created

Details

Signed-off-by: Pablo Garrido <pablogs9@gmail.com>
@jimmy-mcelwain
Copy link

I think that this is going to have a bit of a problem too, but less important. The strlen(port) <= MAX_PORT_LEN in the condition is going to return true if the length of the port is 6, now, meaning it will truncate the 6 digit port (invalid) into a 5 digit port (valid). It should still return RMW_RET_INVALID_ARGUMENT though.

@pablogs9
Copy link
Member Author

@jimmy-mcelwain looks good to you now?

@jimmy-mcelwain
Copy link

It looks like you modified the condition for MAX_IP_LEN rather than MAX_PORT_LEN. Maybe some change is needed in the IP side since it is using snprintf too (I don't know, I haven't looked into that), but I think that change was probably supposed to be for the strlen(port) <= MAX_PORT_LEN that I mentioned before.

@jimmy-mcelwain
Copy link

It looks like it may need to change here too:

if (strlen(RMW_UXRCE_DEFAULT_PORT) <= MAX_PORT_LEN) {
snprintf(
init_options->impl->transport_params.agent_port,
MAX_PORT_LEN, "%s", RMW_UXRCE_DEFAULT_PORT);
} else {
RMW_UROS_TRACE_MESSAGE("default port configuration overflow")
return RMW_RET_INVALID_ARGUMENT;
}

@pablogs9
Copy link
Member Author

pablogs9 commented Feb 27, 2025

Thanks, sorry, today I'm very busy and I guess that this PR requires more attention from my side...
The CI is failing due to a cpplint & uncrustify incompatibility.
If now we are ok with that, I can merge.

@jimmy-mcelwain
Copy link

No problem at all, I appreciate the quick response. I don't have a easy way of testing/verifying that these changes work at the moment, but just looking at the code I don't see anything wrong.

@pablogs9 pablogs9 merged commit aa15666 into rolling Feb 28, 2025
3 checks passed
@pablogs9 pablogs9 deleted the pablogs9-patch-1 branch February 28, 2025 07:22
mergify bot pushed a commit that referenced this pull request Feb 28, 2025
* Fix max lenght in UDP port string

* Fix CI

Signed-off-by: Pablo Garrido <pablogs9@gmail.com>

* Update

* Linting

* Update

* Fix uncrustify

---------

Signed-off-by: Pablo Garrido <pablogs9@gmail.com>
(cherry picked from commit aa15666)
mergify bot pushed a commit that referenced this pull request Feb 28, 2025
* Fix max lenght in UDP port string

* Fix CI

Signed-off-by: Pablo Garrido <pablogs9@gmail.com>

* Update

* Linting

* Update

* Fix uncrustify

---------

Signed-off-by: Pablo Garrido <pablogs9@gmail.com>
(cherry picked from commit aa15666)

# Conflicts:
#	.github/workflows/ci.yml
pablogs9 added a commit that referenced this pull request Feb 28, 2025
* Fix max lenght in UDP port string

* Fix CI

Signed-off-by: Pablo Garrido <pablogs9@gmail.com>

* Update

* Linting

* Update

* Fix uncrustify

---------

Signed-off-by: Pablo Garrido <pablogs9@gmail.com>
(cherry picked from commit aa15666)

Co-authored-by: Pablo Garrido <pablogs9@gmail.com>
pablogs9 added a commit that referenced this pull request Feb 28, 2025
* Fix max lenght in UDP port string (#315)

* Fix max lenght in UDP port string

* Fix CI

Signed-off-by: Pablo Garrido <pablogs9@gmail.com>

* Update

* Linting

* Update

* Fix uncrustify

---------

Signed-off-by: Pablo Garrido <pablogs9@gmail.com>
(cherry picked from commit aa15666)

# Conflicts:
#	.github/workflows/ci.yml

* Fix

---------

Co-authored-by: Pablo Garrido <pablogs9@gmail.com>
@jimmy-mcelwain
Copy link

Thanks!

@jimmy-mcelwain
Copy link

@pablogs9 I just realized that this was backported to humble and iron. Shouldn't it be backported to jazzy too (instead of iron)?

@pablogs9
Copy link
Member Author

pablogs9 commented Mar 6, 2025

@mergify backport jazzy

@mergify
Copy link
Contributor

mergify bot commented Mar 6, 2025

backport jazzy

✅ Backports have been created

Details

mergify bot pushed a commit that referenced this pull request Mar 6, 2025
* Fix max lenght in UDP port string

* Fix CI

Signed-off-by: Pablo Garrido <pablogs9@gmail.com>

* Update

* Linting

* Update

* Fix uncrustify

---------

Signed-off-by: Pablo Garrido <pablogs9@gmail.com>
(cherry picked from commit aa15666)

# Conflicts:
#	.github/workflows/ci.yml
pablogs9 added a commit that referenced this pull request Mar 6, 2025
* Fix max lenght in UDP port string (#315)

* Fix max lenght in UDP port string

* Fix CI

Signed-off-by: Pablo Garrido <pablogs9@gmail.com>

* Update

* Linting

* Update

* Fix uncrustify

---------

Signed-off-by: Pablo Garrido <pablogs9@gmail.com>
(cherry picked from commit aa15666)

# Conflicts:
#	.github/workflows/ci.yml

* Fix conflicts

---------

Co-authored-by: Pablo Garrido <pablogs9@gmail.com>
@pablogs9
Copy link
Member Author

pablogs9 commented Mar 6, 2025

@pablogs9 I just realized that this was backported to humble and iron. Shouldn't it be backported to jazzy too (instead of iron)?

done

@jimmy-mcelwain
Copy link

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants