Project

General

Profile

Actions

Feature #2320

closed

Javascript helper to toggle subnet mask length for IPv4/IPv6 during input

Added by Seth Mos about 12 years ago. Updated almost 12 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Web Interface
Target version:
Start date:
03/28/2012
Due date:
% Done:

90%

Estimated time:
Plus Target Version:
Release Notes:

Description

There are numerous places in the UI where one is free to enter a IPv4 or IPv6 address, however, the max subnet mask length for ip4 is 32 bits, and for ip6 is 128 bits. A bit of JS that could toggle the subnetmask length to drop to 32 on a ip4 address during input saves a lot of headache.

This is atleast valid on editing aliases, virtual IP, static routes? Probably others, we'll add to the ticket for those.

Actions #1

Updated by Darren Embry about 12 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 90

Pretty much done. I've done some testing but I want others to test as well.

Actions #2

Updated by Darren Embry about 12 years ago

  • Assignee changed from Darren Embry to Chris Buechler

Chris, I'm reassigning this to you so you can test this or have someone else test it out. I'm pretty sure I've found every place where someone can enter an ipv4 or ipv6 address, see revisions.

Actions #3

Updated by Chris Buechler about 12 years ago

  • Assignee changed from Chris Buechler to Seth Mos

seems good to me, will let Seth give the final approval.

Actions #4

Updated by Seth Mos about 12 years ago

  • Assignee changed from Seth Mos to Darren Embry

Add on system_routes_edit.php too (needs gateways defined to save)
on firewall_virtual_ip_edit.php it jumps to a length of 1 on a valid ipv4
Add on vpn_ipsec_phase2.php (Add IPsec phase 2 entry, add phase 1 first)

Couldn't find any others going through the UI.

Actions #5

Updated by Darren Embry about 12 years ago

added on system_routes_edit.php

Actions #6

Updated by Darren Embry about 12 years ago

fixed firewall_virtual_ip_edit.php (will commit soonish)

Actions #7

Updated by Darren Embry about 12 years ago

In vpn_ipsec_phase2.php there is some existing client-side JavaScript logic that changes the selected value for the #bits dropdowns that conflicts with what I'm doing.

Namely those times when it sets the #bits to 24 or 64 by default.

I'm going to disable that stuff for the time being but if you still want that behavior in some way then we need to discuss exactly when those changes in the dropdown values happen.

Actions #8

Updated by Chris Buechler about 12 years ago

it should still default that way on IPsec. For v4 addresses, show 1-32 and default to 24, and for v6, show 1-128 and default to 64.

Actions #9

Updated by Darren Embry about 12 years ago

Okay, all my changesets are committed now. Gotta think hard about this one then.

Actions #10

Updated by Darren Embry about 12 years ago

I've restored default 24/64 bits.

I had to modify the normal behavior on dropdown value changes between ipv6 and ipv4 a bit.

Actions #11

Updated by Seth Mos almost 12 years ago

I like it so far, it appears to work as intended for me. Consider resolved?

Actions #12

Updated by Chris Buechler almost 12 years ago

  • Status changed from Feedback to Resolved

yeah seems fine to me

Actions

Also available in: Atom PDF