Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pike
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pikelang
pike
Commits
a0122ad6
Commit
a0122ad6
authored
Sep 18, 2013
by
Martin Nilsson
Browse files
Options
Downloads
Patches
Plain Diff
Whitespace changes and changed Array.map to map.
parent
a3a007e6
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/modules/Protocols.pmod/DNS.pmod
+55
-51
55 additions, 51 deletions
lib/modules/Protocols.pmod/DNS.pmod
with
55 additions
and
51 deletions
lib/modules/Protocols.pmod/DNS.pmod
+
55
−
51
View file @
a0122ad6
...
...
@@ -15,10 +15,13 @@
//! No error condition.
final constant NOERROR=0;
//! The name server was unable to interpret the request due to a format error.
//! The name server was unable to interpret the request due to a
//! format error.
final constant FORMERR=1;
//!The name server encountered an internal failure while processing this request, for example an operating system error or a forwarding timeout.
//! The name server encountered an internal failure while processing
//! this request, for example an operating system error or a
//! forwarding timeout.
final constant SERVFAIL=2;
//! Some name that ought to exist, does not exist.
...
...
@@ -27,7 +30,8 @@ final constant NXDOMAIN=3;
//! The name server does not support the specified Opcode.
final constant NOTIMPL=4;
//! The name server refuses to perform the specified operation for policy or security reasons.
//! The name server refuses to perform the specified operation for
//! policy or security reasons.
final constant REFUSED=5;
//! Some RRset that ought to exist, does not exist.
...
...
@@ -231,12 +235,12 @@ class protocol
return rnaptr;
case T_TXT:
return
Array.
map(stringp(entry->txt)? ({entry->txt}):(entry->txt||({})),
return map(stringp(entry->txt)? ({entry->txt}):(entry->txt||({})),
lambda(string t) {
return sprintf("%1H", t);
})*"";
case T_SPF:
return
Array.
map(stringp(entry->spf)? ({entry->spf}):(entry->spf||({})),
return map(stringp(entry->spf)? ({entry->spf}):(entry->spf||({})),
lambda(string t) {
return sprintf("%1H", t);
})*"";
...
...
@@ -1090,7 +1094,8 @@ class tcp_server
}
port->set_id(port);
// port objects are stored for destruction when the server object is destroyed.
// Port objects are stored for destruction when the server
// object is destroyed.
ports += ({ port });
}
}
...
...
@@ -1116,10 +1121,10 @@ class dual_server {
if (!con->tcp_connection) {
if (sizeof(rpl) > 512) {
rpl = sprintf("%s%8c", rpl[..3], 0); //
t
runcate after header and
rpl = sprintf("%s%8c", rpl[..3], 0); //
T
runcate after header and
// send empty response
// ("dnscache strategy")
rpl[2] |= 2; //
s
et TC bit
rpl[2] |= 2; //
S
et TC bit
}
con->send(m->ip, m->port, rpl);
} else
...
...
@@ -1373,7 +1378,7 @@ class client
nameservers = ({ "127.0.0.1" });
}
domains -= ({ "" });
domains =
Array.
map(domains, lambda(string d) {
domains = map(domains, lambda(string d) {
if (d[-1] == '.') {
return d[..<1];
}
...
...
@@ -1594,7 +1599,6 @@ class client
}
array res=({});
foreach(m->an, mapping x)
{
res+=({({x->priority, x->weight, x->port, x->target})});
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment