OpenNebula / one-apps

Toolchain to build OpenNebula appliances
Apache License 2.0
12 stars 13 forks source link

VNET context default gateway is not checked if valid #132

Open brodriguez-opennebula opened 4 weeks ago

brodriguez-opennebula commented 4 weeks ago

Let's suppose that a Virtual network has the following default gateway

GATEWAY=" "

Being the Gateway a simple space an invalid network configuration is rendered

The solution has to do with comparing the gateway with the following bash style regex:

^(([1-9]?[0-9]|1[0-9][0-9]|2([0-4][0-9]|5[0-5]))\.){3}([1-9]?[0-9]|1[0-9][0-9]|2([0-4][0-9]|5
[  0-5]))$