[BUG] I'm able to add IPv4 with an invalid prefix and IPv6 with invalid netmask in Directadmin using API

MaXi32

Verified User
Joined
Jul 25, 2016
Messages
658
Location
The Earth
I think this is a long-time bug. An IPv4 can only have a maximum prefix length of 32. I wonder what would happen in Directadmin system when this invalid prefix is there. In GUI mode, of course, you cannot do this as you have to enter it in the form of 255.XXX.XXX.0

I believe the step is easy to reproduce using a normal API call from DA documentation:

1672029401976.png



It got added to the system below

1672029613258.png
 
In addition to that, I also have questions related to the above. The below example IPv4 and prefix are valid but are they valid based on Directadmin logic? I asked this since this form cannot be added through GUI but it got through in API.

1.2.3.4/22

Will everything work normally if the above form is added through API?

UPDATE:
I changed the title to include IPv6 as well as I am also able to add an invalid IPv6 netmask in the IP form using API:

The cf01:: is not a valid netmask for IPv6

1672050107193.png
 
Last edited:
Back
Top