d89b0452185d410b7768ee6c43803525d57b30cf
The vxlan port number was just used as a UDP port for the SVD. The port number is not used anywhere in the datapath and doesn't need to be statically configured from the dynamic range of ports. This patch lets kernel pick any available port by binding to a socket. Then it closes the socket and returns the used port for the vxlan device. There is a very small time window between the temporary socket is closed and the port is set to the vxlan interface, so there is a loop that tries the mechanism ten times, always letting the kernel to pick a new unused port. Then it bails out and agent needs to be restarted. Closes-Bug: #2158130 Assisted-By: Claude Opus 4.6 Change-Id: I2bebc47fe4c435539476e591b684ce552da8651d Signed-off-by: Jakub Libosvar <jlibosva@redhat.com>
OpenStack Neutron
Neutron is an OpenStack project to provide "network connectivity as a service" between interface devices (e.g., vNICs) managed by other OpenStack services (e.g., Nova).
To learn more about neutron:
- Documentation: https://docs.openstack.org/neutron/latest/
- Features: https://specs.openstack.org/openstack/neutron-specs
- Defects: https://launchpad.net/neutron
- Release notes: https://docs.openstack.org/releasenotes/neutron/index.html
- Source: https://opendev.org/openstack/neutron
If you would like to contribute to Neutron, please read the file CONTRIBUTING.rst or see the Neutron contributor guide:
https://docs.openstack.org/neutron/latest/contributor/contributing.html
Get in touch via email. Use [Neutron] in your subject.
Languages
Python
99.6%
Shell
0.4%