Skip to content

lib/tapi: support reusing existing IP addresses#80

Open
okt-viacheslav wants to merge 1 commit into
oktetlabs:mainfrom
okt-viacheslav:ip_reuse
Open

lib/tapi: support reusing existing IP addresses#80
okt-viacheslav wants to merge 1 commit into
oktetlabs:mainfrom
okt-viacheslav:ip_reuse

Conversation

@okt-viacheslav

Copy link
Copy Markdown
Contributor

Some configurations do not allow IP reconfiguration on hosts, otherwise they end up unreachable. One example of this is cloud environments.

Give tests a way to prevent any IP address changes on the agent interfaces by using IP addresses already configured on agent hosts.

Reviewed-by: Sergey Nikitin sergey.nikitin@oktet.tech

Testing done: tested by running test agents on an AWS network

@ol-andrewr ol-andrewr self-assigned this Aug 29, 2025
Comment thread lib/tapi/tapi_cfg_net.c Outdated
Comment thread lib/tapi/tapi_cfg_net.c Outdated
Comment on lines +2038 to +2039
"/ip%u_address:%jx",
af == AF_INET ? 4 : 6, 0);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why %jx ? Also 0 would not be converted to intmax_t, since it's a variadic argument, so you may end up getting garbage.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure. The rest of the file uses %jx, I'm just following what's already written. Should I use something else?

The missing cast is a good point, I'll add it if we decide to keep %jx

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still need to decide if we want to change %jx to something else

Some configurations do not allow IP reconfiguration on hosts, otherwise
they end up unreachable. One example of this is cloud environments.

Give tests a way to prevent any IP address changes on the agent interfaces by
using IP addresses already configured on agent hosts.

Signed-off-by: Viacheslav Galaktionov <viacheslav.galaktionov@oktet.tech>
Reviewed-by: Sergey Nikitin <sergey.nikitin@oktet.tech>
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.

4 participants