AbdelrahmanElawady opened a new issue, #8122: URL: https://github.com/apache/trafficcontrol/issues/8122
<!-- ************ STOP!! ************ If this issue identifies a security vulnerability, DO NOT submit it! Instead, contact the Apache Traffic Control Security Team at [email protected] and follow the guidelines at https://apache.org/security regarding vulnerability disclosure. - For *SUPPORT QUESTIONS*, use the #traffic-control channel on the ASF slack (https://s.apache.org/tc-slack-request) or the Traffic Control Users mailing list (send an email to [email protected] to subscribe). - Before submitting, please **SEARCH GITHUB** for a similar issue or PR * https://github.com/apache/trafficcontrol/issues * https://github.com/apache/trafficcontrol/pulls --> <!-- Do not submit security vulnerabilities or support requests here - see above --> ## This Bug Report affects these Traffic Control components: <!-- delete all those that don't apply --> - Traffic Ops ## What did you do? <!-- If the current behavior is a bug, please provide the *STEPS TO REPRODUCE* and include the applicable TC version. --> When creating servers on the same profile with the same service address in range /32 for IPv4 or /128 for IPv6 (i.e. 1.1.1.1/32) it works fine. However, other ranges fail as servers with the same service address are not allowed To reproduce: - Run Traffic Ops - Create server with service address ending in /32 - Create another with the same address it won't fail - Try with /24 the same case and it will fail This is because we are using `inet` Postgres type to represent IPs and it omits the mask part if it's a single host: https://www.postgresql.org/docs/current/datatype-net-types.html#DATATYPE-INET So upon validation the IP stored in DB does not match what's in the request and it gets created with no errors. ## What did you expect to happen? <!-- Describe how the bug happens --> Fail with error indicating that servers on the same profile can't share the same service address for subnet /32. ## What actually happened? <!-- Describe what the behavior would be without the bug --> Servers were created fine. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
