恥ずかしい勘違いから生まれた、DHCP6の不要かつ部分的な実装
Revision | 6c889b9b06abd249a633b3924dc5fb65b5e932a8 (tree) |
---|---|
Time | 2021-08-15 22:16:06 |
Author | dyknon <dyknon@user...> |
Commiter | dyknon |
fix AbstractOption::Time
@@ -13,8 +13,8 @@ sub range { (undef, undef) } | ||
13 | 13 | |
14 | 14 | sub data { |
15 | 15 | my $self = shift; |
16 | - return "\xff\xff\xff\xff" if($self->value == "inf"); | |
17 | - pack("L>", $self->value); | |
16 | + return "\xff\xff\xff\xff" if($self->time == "inf"); | |
17 | + pack("L>", $self->time); | |
18 | 18 | } |
19 | 19 | |
20 | 20 | sub parse_data { |
@@ -37,9 +37,9 @@ sub verify { | ||
37 | 37 | my $self = shift; |
38 | 38 | my $who = shift; |
39 | 39 | my ($from, $to) = $self->range; |
40 | - return 0 if(defined $from && $from > $self->value); | |
41 | - return 0 if(defined $to && $to <= $self->value); | |
42 | - return 0 if($self->value != "inf" && $self->value >= 0xffffffff); | |
40 | + return 0 if(defined $from && $from > $self->time); | |
41 | + return 0 if(defined $to && $to <= $self->time); | |
42 | + return 0 if($self->time != "inf" && $self->time >= 0xffffffff); | |
43 | 43 | 1; |
44 | 44 | } |
45 | 45 |