Prevent request id overflow over 65535
This commit is contained in:
parent
53ce17e5ae
commit
e220af2442
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=51901
4 changed files with 36 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
|||
|
||||
PORTNAME= Net-DNS
|
||||
PORTVERSION= 0.12
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= net perl5
|
||||
MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
|
||||
MASTER_SITE_SUBDIR= Net
|
||||
|
@ -29,4 +30,7 @@ MAN3= Net::DNS.3 Net::DNS::Header.3 Net::DNS::Packet.3 \
|
|||
Net::DNS::RR::NSAP.3 Net::DNS::RR::NULL.3 Net::DNS::RR::PX.3 \
|
||||
Net::DNS::Update.3
|
||||
|
||||
post-patch:
|
||||
find ${WRKSRC} -name "*.orig" -exec ${RM} "{}" ";"
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
|
14
dns/p5-Net-DNS/files/patch-aa
Normal file
14
dns/p5-Net-DNS/files/patch-aa
Normal file
|
@ -0,0 +1,14 @@
|
|||
--- lib/Net/DNS/Resolver.pm.bak Thu Oct 2 09:32:14 1997
|
||||
+++ lib/Net/DNS/Resolver.pm Fri Dec 21 00:20:11 2001
|
||||
@@ -244,7 +244,10 @@
|
||||
}
|
||||
|
||||
sub nextid {
|
||||
- return $global{"id"}++;
|
||||
+ if (++$global{"id"} > 65535) {
|
||||
+ $global{"id"} = 0;
|
||||
+ }
|
||||
+ return $global{"id"};
|
||||
}
|
||||
|
||||
=head2 searchlist
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
PORTNAME= Net-DNS
|
||||
PORTVERSION= 0.12
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= net perl5
|
||||
MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
|
||||
MASTER_SITE_SUBDIR= Net
|
||||
|
@ -29,4 +30,7 @@ MAN3= Net::DNS.3 Net::DNS::Header.3 Net::DNS::Packet.3 \
|
|||
Net::DNS::RR::NSAP.3 Net::DNS::RR::NULL.3 Net::DNS::RR::PX.3 \
|
||||
Net::DNS::Update.3
|
||||
|
||||
post-patch:
|
||||
find ${WRKSRC} -name "*.orig" -exec ${RM} "{}" ";"
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
|
14
net/p5-Net-DNS/files/patch-aa
Normal file
14
net/p5-Net-DNS/files/patch-aa
Normal file
|
@ -0,0 +1,14 @@
|
|||
--- lib/Net/DNS/Resolver.pm.bak Thu Oct 2 09:32:14 1997
|
||||
+++ lib/Net/DNS/Resolver.pm Fri Dec 21 00:20:11 2001
|
||||
@@ -244,7 +244,10 @@
|
||||
}
|
||||
|
||||
sub nextid {
|
||||
- return $global{"id"}++;
|
||||
+ if (++$global{"id"} > 65535) {
|
||||
+ $global{"id"} = 0;
|
||||
+ }
|
||||
+ return $global{"id"};
|
||||
}
|
||||
|
||||
=head2 searchlist
|
Loading…
Reference in a new issue