• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

恥ずかしい勘違いから生まれた、DHCP6の不要かつ部分的な実装


Commit MetaInfo

Revisionbd1a0e671c5423fd4ace1015ec4cb7cff8beb076 (tree)
Time2021-08-12 21:52:04
Authordyknon <dyknon@user...>
Commiterdyknon

Log Message

fix errrors

Change Summary

Incremental Difference

--- a/Net/DHCP6/Exchange/InfoReq.pm
+++ b/Net/DHCP6/Exchange/InfoReq.pm
@@ -52,9 +52,11 @@ sub new {
5252 my @ooro = grep{$_->code == DHCP6_OPT_ORO}@{$opts{options}};
5353 die "there are multiple option request options" if(@ooro >= 2);
5454 if(@{$opts{request}}){
55- die if(!$ooro[0]->isa(Net::DHCP6::Option::OptionRequest));
5655 @{$opts{options}} = grep{$_->code != DHCP6_OPT_ORO}@{$opts{options}};
57- push @{$opts{request}}, $ooro[0]->all_elems if(@ooro);
56+ if(@ooro){
57+ die if(!$ooro[0]->isa("Net::DHCP6::Option::OptionRequest"));
58+ push @{$opts{request}}, $ooro[0]->all_elems
59+ };
5860 push @{$opts{options}},
5961 d6opt_new_option_request(list => @{$opts{request}});
6062 }
--- a/Net/DHCP6/Value/DomainName.pm
+++ b/Net/DHCP6/Value/DomainName.pm
@@ -27,20 +27,21 @@ sub new {
2727 }
2828 $class->new(@label);
2929 }else{
30- push @label, "" if($_[$#_] ne "");
31- if(join "", map{length $_ > 63} @_){
30+ my @label = @_;
31+ push @label, "" if($label[$#label] ne "");
32+ if(join "", map{length $_ > 63} @label){
3233 die "length of domain label > 63";
3334 }
34- if(length join(".", @_) > 254){
35+ if(length join(".", @label) > 254){
3536 die "length of domain name > 255";
3637 }
3738 if(join "",
3839 map{$_ !~ /^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?$/}
39- @_[0 .. ($#_-1)]
40+ @label[0 .. ($#label-1)]
4041 ){
4142 die "invalid domain name";
4243 }
43- my $self = [@_];
44+ my $self = [@label];
4445 bless $self, $class;
4546 }
4647 }