Commit 42243214 authored by Simon Kelley's avatar Simon Kelley

"w" multiplier in lease times.

parent 23245c0c
...@@ -29,6 +29,15 @@ version 2.63 ...@@ -29,6 +29,15 @@ version 2.63
Allow the target of a --cname flag to be another --cname. Allow the target of a --cname flag to be another --cname.
Teach DHCPv6 about the RFC 4242 information-refresh-time
option, and add parsing if the minutes, hours and days
format for options. Thanks to Francois-Xavier Le Bail for
the suggestion.
Allow "w" (for week) as multiplier in lease times, as well
as seconds, minutes, hours and days. Álvaro Gámez Machado
spotted the ommission.
version 2.62 version 2.62
Update German translation. Thanks to Conrad Kostecki. Update German translation. Thanks to Conrad Kostecki.
...@@ -54,12 +63,6 @@ version 2.62 ...@@ -54,12 +63,6 @@ version 2.62
two addresses in the same network. Thanks to Jim Bos for two addresses in the same network. Thanks to Jim Bos for
his help nailing this. his help nailing this.
Teach DHCPv6 about the RFC 4242 information-refresh-time
option, and add parsing if the minutes, hours and days
format for options. Thanks to Francois-Xavier Le Bail for
the suggestion.
version 2.61 version 2.61
Re-write interface discovery code on *BSD to use Re-write interface discovery code on *BSD to use
getifaddrs. This is more portable, more straightforward, getifaddrs. This is more portable, more straightforward,
......
...@@ -818,6 +818,10 @@ static int parse_dhcp_opt(char *errstr, char *arg, int flags) ...@@ -818,6 +818,10 @@ static int parse_dhcp_opt(char *errstr, char *arg, int flags)
switch (comma[strlen(comma) - 1]) switch (comma[strlen(comma) - 1])
{ {
case 'w':
case 'W':
fac *= 7;
/* fall through */
case 'd': case 'd':
case 'D': case 'D':
fac *= 24; fac *= 24;
...@@ -2156,6 +2160,10 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma ...@@ -2156,6 +2160,10 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
{ {
switch (a[leasepos][strlen(a[leasepos]) - 1]) switch (a[leasepos][strlen(a[leasepos]) - 1])
{ {
case 'w':
case 'W':
fac *= 7;
/* fall through */
case 'd': case 'd':
case 'D': case 'D':
fac *= 24; fac *= 24;
...@@ -2306,6 +2314,10 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma ...@@ -2306,6 +2314,10 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
last = *lastp; last = *lastp;
switch (last) switch (last)
{ {
case 'w':
case 'W':
fac *= 7;
/* fall through */
case 'd': case 'd':
case 'D': case 'D':
fac *= 24; fac *= 24;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment