« Previous | Next » 

Revision 055a43d2

Parent 45cd176a
Child 6b18c66b

Added by Phil Davis over 5 years ago

Allow extended alias inputs #3890

Currently if you enter a space-separated list of subnets in the IP address box when entering an alias, the code reports that the data is invalid. But it does actually expand the list of subnets into multiple rows, and enters the various subnet CIDRs into the CIDR column for the user. The user can press Save a second time and the data is now valid so the code saves it happily. This is rather odd, as reported in redmine #3890.
Also, if you input an IP range (e.g. plus description and in the 2nd row put some other subnet and description, the range is correctly expanded, but the description only appears against the 1st subnet of the range. The description from the 2nd row ends up as the description against the 2nd subnet of the range, and the rest of the descriptions are blank. i.e. the descriptions do not get copied and pushed down as the IP ranges are expanded.
This change fixes all that stuff by first parsing the posted data and expanding any IP ranges and/or space-separated lists, building arrays that have all their entries lined up:
which are then validated.

This is for master (2.2) branch. Actually it was not too difficult to integrate.


  • added
  • modified
  • copied
  • renamed
  • deleted

View differences