ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/FreeBSDAdmin/VPN/mpd-common.sh
(Generate patch)

Comparing FreeBSDAdmin/VPN/mpd-common.sh (file contents):
Revision 1005 by douglas, 2008-05-18T05:34:06-07:00 vs.
Revision 1006 by douglas, 2008-05-18T17:29:24-07:00

# Line 12 | Line 12 | authname=$5
12  
13   [[ $interface =~ ^ng[0-9]+$ ]] || usage
14   [[ $proto == inet ]] || usage
15 < [[ $local_ip =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]] || usage
16 < [[ $remote_ip =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]] || usage
15 >
16 > if [[ $local_ip =~ ^([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})(/[0-9]+)?$ ]]; then
17 >        local_ip=${BASH_REMATCH[1]}
18 > else
19 >        usage
20 > fi
21 >
22 > if [[ $remote_ip =~ ^([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})(/[0-9]+)?$ ]]; then
23 >        remote_ip=${BASH_REMATCH[1]}
24 > else
25 >        usage
26 > fi
27 >
28   [[ -n $authname ]] || usage
29  
30   function key()

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines