Sync: merge r214353 through r214648 from ^/head.
This commit is contained in:
commit
b9f2f8c36f
21
bin/rm/rm.1
21
bin/rm/rm.1
@ -32,7 +32,7 @@
|
||||
.\" @(#)rm.1 8.5 (Berkeley) 12/5/94
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd October 8, 2010
|
||||
.Dd October 31, 2010
|
||||
.Dt RM 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -100,6 +100,11 @@ Specifying this flag for a read only file will cause
|
||||
.Nm
|
||||
to generate an error message and exit.
|
||||
The file will not be removed or overwritten.
|
||||
.Pp
|
||||
N.B.: The
|
||||
.Fl P
|
||||
flag is not considered a security feature
|
||||
.Pq see Sx BUGS .
|
||||
.It Fl R
|
||||
Attempt to remove the file hierarchy rooted in each
|
||||
.Ar file
|
||||
@ -229,8 +234,12 @@ command appeared in
|
||||
.Sh BUGS
|
||||
The
|
||||
.Fl P
|
||||
option assumes that the underlying file system updates existing blocks
|
||||
in-place and does not store new data in a new location.
|
||||
This is true for UFS but not for ZFS, which is using a Copy-On-Write strategy.
|
||||
In addition, only regular files are overwritten, other types of files
|
||||
are not.
|
||||
option assumes that the underlying storage overwrites file blocks
|
||||
when data is written to an existing offset.
|
||||
Several factors including the file system and its backing store could defeat
|
||||
this assumption.
|
||||
This includes, but is not limited to file systems that use a
|
||||
Copy-On-Write strategy (e.g. ZFS or UFS when snapshots are being used), Flash
|
||||
media that are using a wear leveling algorithm, or when the backing datastore
|
||||
does journaling, etc.
|
||||
In addition, only regular files are overwritten, other types of files are not.
|
||||
|
153
bin/sh/eval.c
153
bin/sh/eval.c
@ -196,6 +196,7 @@ void
|
||||
evaltree(union node *n, int flags)
|
||||
{
|
||||
int do_etest;
|
||||
union node *next;
|
||||
|
||||
do_etest = 0;
|
||||
if (n == NULL) {
|
||||
@ -203,84 +204,88 @@ evaltree(union node *n, int flags)
|
||||
exitstatus = 0;
|
||||
goto out;
|
||||
}
|
||||
do {
|
||||
next = NULL;
|
||||
#ifndef NO_HISTORY
|
||||
displayhist = 1; /* show history substitutions done with fc */
|
||||
displayhist = 1; /* show history substitutions done with fc */
|
||||
#endif
|
||||
TRACE(("evaltree(%p: %d) called\n", (void *)n, n->type));
|
||||
switch (n->type) {
|
||||
case NSEMI:
|
||||
evaltree(n->nbinary.ch1, flags & ~EV_EXIT);
|
||||
if (evalskip)
|
||||
goto out;
|
||||
evaltree(n->nbinary.ch2, flags);
|
||||
break;
|
||||
case NAND:
|
||||
evaltree(n->nbinary.ch1, EV_TESTED);
|
||||
if (evalskip || exitstatus != 0) {
|
||||
goto out;
|
||||
TRACE(("evaltree(%p: %d) called\n", (void *)n, n->type));
|
||||
switch (n->type) {
|
||||
case NSEMI:
|
||||
evaltree(n->nbinary.ch1, flags & ~EV_EXIT);
|
||||
if (evalskip)
|
||||
goto out;
|
||||
next = n->nbinary.ch2;
|
||||
break;
|
||||
case NAND:
|
||||
evaltree(n->nbinary.ch1, EV_TESTED);
|
||||
if (evalskip || exitstatus != 0) {
|
||||
goto out;
|
||||
}
|
||||
next = n->nbinary.ch2;
|
||||
break;
|
||||
case NOR:
|
||||
evaltree(n->nbinary.ch1, EV_TESTED);
|
||||
if (evalskip || exitstatus == 0)
|
||||
goto out;
|
||||
next = n->nbinary.ch2;
|
||||
break;
|
||||
case NREDIR:
|
||||
evalredir(n, flags);
|
||||
break;
|
||||
case NSUBSHELL:
|
||||
evalsubshell(n, flags);
|
||||
do_etest = !(flags & EV_TESTED);
|
||||
break;
|
||||
case NBACKGND:
|
||||
evalsubshell(n, flags);
|
||||
break;
|
||||
case NIF: {
|
||||
evaltree(n->nif.test, EV_TESTED);
|
||||
if (evalskip)
|
||||
goto out;
|
||||
if (exitstatus == 0)
|
||||
next = n->nif.ifpart;
|
||||
else if (n->nif.elsepart)
|
||||
next = n->nif.elsepart;
|
||||
else
|
||||
exitstatus = 0;
|
||||
break;
|
||||
}
|
||||
evaltree(n->nbinary.ch2, flags);
|
||||
break;
|
||||
case NOR:
|
||||
evaltree(n->nbinary.ch1, EV_TESTED);
|
||||
if (evalskip || exitstatus == 0)
|
||||
goto out;
|
||||
evaltree(n->nbinary.ch2, flags);
|
||||
break;
|
||||
case NREDIR:
|
||||
evalredir(n, flags);
|
||||
break;
|
||||
case NSUBSHELL:
|
||||
evalsubshell(n, flags);
|
||||
do_etest = !(flags & EV_TESTED);
|
||||
break;
|
||||
case NBACKGND:
|
||||
evalsubshell(n, flags);
|
||||
break;
|
||||
case NIF: {
|
||||
evaltree(n->nif.test, EV_TESTED);
|
||||
if (evalskip)
|
||||
goto out;
|
||||
if (exitstatus == 0)
|
||||
evaltree(n->nif.ifpart, flags);
|
||||
else if (n->nif.elsepart)
|
||||
evaltree(n->nif.elsepart, flags);
|
||||
else
|
||||
case NWHILE:
|
||||
case NUNTIL:
|
||||
evalloop(n, flags & ~EV_EXIT);
|
||||
break;
|
||||
case NFOR:
|
||||
evalfor(n, flags & ~EV_EXIT);
|
||||
break;
|
||||
case NCASE:
|
||||
evalcase(n, flags);
|
||||
break;
|
||||
case NDEFUN:
|
||||
defun(n->narg.text, n->narg.next);
|
||||
exitstatus = 0;
|
||||
break;
|
||||
}
|
||||
case NWHILE:
|
||||
case NUNTIL:
|
||||
evalloop(n, flags & ~EV_EXIT);
|
||||
break;
|
||||
case NFOR:
|
||||
evalfor(n, flags & ~EV_EXIT);
|
||||
break;
|
||||
case NCASE:
|
||||
evalcase(n, flags);
|
||||
break;
|
||||
case NDEFUN:
|
||||
defun(n->narg.text, n->narg.next);
|
||||
exitstatus = 0;
|
||||
break;
|
||||
case NNOT:
|
||||
evaltree(n->nnot.com, EV_TESTED);
|
||||
exitstatus = !exitstatus;
|
||||
break;
|
||||
break;
|
||||
case NNOT:
|
||||
evaltree(n->nnot.com, EV_TESTED);
|
||||
exitstatus = !exitstatus;
|
||||
break;
|
||||
|
||||
case NPIPE:
|
||||
evalpipe(n);
|
||||
do_etest = !(flags & EV_TESTED);
|
||||
break;
|
||||
case NCMD:
|
||||
evalcommand(n, flags, (struct backcmd *)NULL);
|
||||
do_etest = !(flags & EV_TESTED);
|
||||
break;
|
||||
default:
|
||||
out1fmt("Node type = %d\n", n->type);
|
||||
flushout(&output);
|
||||
break;
|
||||
}
|
||||
case NPIPE:
|
||||
evalpipe(n);
|
||||
do_etest = !(flags & EV_TESTED);
|
||||
break;
|
||||
case NCMD:
|
||||
evalcommand(n, flags, (struct backcmd *)NULL);
|
||||
do_etest = !(flags & EV_TESTED);
|
||||
break;
|
||||
default:
|
||||
out1fmt("Node type = %d\n", n->type);
|
||||
flushout(&output);
|
||||
break;
|
||||
}
|
||||
n = next;
|
||||
} while (n != NULL);
|
||||
out:
|
||||
if (pendingsigs)
|
||||
dotrap();
|
||||
@ -1130,7 +1135,7 @@ commandcmd(int argc, char **argv)
|
||||
return typecmd_impl(2, argv - 1, cmd, path);
|
||||
}
|
||||
if (argc != 0)
|
||||
error("commandcmd() called while it should not be");
|
||||
error("commandcmd bad call");
|
||||
|
||||
/*
|
||||
* Do nothing successfully if no command was specified;
|
||||
|
@ -98,7 +98,7 @@ static struct arglist exparg; /* holds expanded arg list */
|
||||
static void argstr(char *, int);
|
||||
static char *exptilde(char *, int);
|
||||
static void expbackq(union node *, int, int);
|
||||
static int subevalvar(char *, char *, int, int, int, int);
|
||||
static int subevalvar(char *, char *, int, int, int, int, int);
|
||||
static char *evalvar(char *, int);
|
||||
static int varisset(char *, int);
|
||||
static void varvalue(char *, int, int, int);
|
||||
@ -216,7 +216,12 @@ argstr(char *p, int flag)
|
||||
char c;
|
||||
int quotes = flag & (EXP_FULL | EXP_CASE | EXP_REDIR); /* do CTLESC */
|
||||
int firsteq = 1;
|
||||
int split_lit;
|
||||
int lit_quoted;
|
||||
|
||||
split_lit = flag & EXP_SPLIT_LIT;
|
||||
lit_quoted = flag & EXP_LIT_QUOTED;
|
||||
flag &= ~(EXP_SPLIT_LIT | EXP_LIT_QUOTED);
|
||||
if (*p == '~' && (flag & (EXP_TILDE | EXP_VARTILDE)))
|
||||
p = exptilde(p, flag);
|
||||
for (;;) {
|
||||
@ -225,17 +230,25 @@ argstr(char *p, int flag)
|
||||
case CTLENDVAR:
|
||||
goto breakloop;
|
||||
case CTLQUOTEMARK:
|
||||
lit_quoted = 1;
|
||||
/* "$@" syntax adherence hack */
|
||||
if (p[0] == CTLVAR && p[2] == '@' && p[3] == '=')
|
||||
break;
|
||||
if ((flag & EXP_FULL) != 0)
|
||||
STPUTC(c, expdest);
|
||||
break;
|
||||
case CTLQUOTEEND:
|
||||
lit_quoted = 0;
|
||||
break;
|
||||
case CTLESC:
|
||||
if (quotes)
|
||||
STPUTC(c, expdest);
|
||||
c = *p++;
|
||||
STPUTC(c, expdest);
|
||||
if (split_lit && !lit_quoted)
|
||||
recordregion(expdest - stackblock() -
|
||||
(quotes ? 2 : 1),
|
||||
expdest - stackblock(), 0);
|
||||
break;
|
||||
case CTLVAR:
|
||||
p = evalvar(p, flag);
|
||||
@ -255,18 +268,21 @@ argstr(char *p, int flag)
|
||||
* assignments (after the first '=' and after ':'s).
|
||||
*/
|
||||
STPUTC(c, expdest);
|
||||
if (flag & EXP_VARTILDE && *p == '~') {
|
||||
if (c == '=') {
|
||||
if (firsteq)
|
||||
firsteq = 0;
|
||||
else
|
||||
break;
|
||||
}
|
||||
if (split_lit && !lit_quoted)
|
||||
recordregion(expdest - stackblock() - 1,
|
||||
expdest - stackblock(), 0);
|
||||
if (flag & EXP_VARTILDE && *p == '~' &&
|
||||
(c != '=' || firsteq)) {
|
||||
if (c == '=')
|
||||
firsteq = 0;
|
||||
p = exptilde(p, flag);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
STPUTC(c, expdest);
|
||||
if (split_lit && !lit_quoted)
|
||||
recordregion(expdest - stackblock() - 1,
|
||||
expdest - stackblock(), 0);
|
||||
}
|
||||
}
|
||||
breakloop:;
|
||||
@ -510,7 +526,7 @@ expbackq(union node *cmd, int quoted, int flag)
|
||||
|
||||
static int
|
||||
subevalvar(char *p, char *str, int strloc, int subtype, int startloc,
|
||||
int varflags)
|
||||
int varflags, int quotes)
|
||||
{
|
||||
char *startp;
|
||||
char *loc = NULL;
|
||||
@ -555,12 +571,12 @@ subevalvar(char *p, char *str, int strloc, int subtype, int startloc,
|
||||
for (loc = startp; loc < str; loc++) {
|
||||
c = *loc;
|
||||
*loc = '\0';
|
||||
if (patmatch(str, startp, varflags & VSQUOTE)) {
|
||||
if (patmatch(str, startp, quotes)) {
|
||||
*loc = c;
|
||||
goto recordleft;
|
||||
}
|
||||
*loc = c;
|
||||
if ((varflags & VSQUOTE) && *loc == CTLESC)
|
||||
if (quotes && *loc == CTLESC)
|
||||
loc++;
|
||||
}
|
||||
return 0;
|
||||
@ -569,14 +585,13 @@ subevalvar(char *p, char *str, int strloc, int subtype, int startloc,
|
||||
for (loc = str - 1; loc >= startp;) {
|
||||
c = *loc;
|
||||
*loc = '\0';
|
||||
if (patmatch(str, startp, varflags & VSQUOTE)) {
|
||||
if (patmatch(str, startp, quotes)) {
|
||||
*loc = c;
|
||||
goto recordleft;
|
||||
}
|
||||
*loc = c;
|
||||
loc--;
|
||||
if ((varflags & VSQUOTE) && loc > startp &&
|
||||
*(loc - 1) == CTLESC) {
|
||||
if (quotes && loc > startp && *(loc - 1) == CTLESC) {
|
||||
for (q = startp; q < loc; q++)
|
||||
if (*q == CTLESC)
|
||||
q++;
|
||||
@ -588,14 +603,13 @@ subevalvar(char *p, char *str, int strloc, int subtype, int startloc,
|
||||
|
||||
case VSTRIMRIGHT:
|
||||
for (loc = str - 1; loc >= startp;) {
|
||||
if (patmatch(str, loc, varflags & VSQUOTE)) {
|
||||
if (patmatch(str, loc, quotes)) {
|
||||
amount = loc - expdest;
|
||||
STADJUST(amount, expdest);
|
||||
return 1;
|
||||
}
|
||||
loc--;
|
||||
if ((varflags & VSQUOTE) && loc > startp &&
|
||||
*(loc - 1) == CTLESC) {
|
||||
if (quotes && loc > startp && *(loc - 1) == CTLESC) {
|
||||
for (q = startp; q < loc; q++)
|
||||
if (*q == CTLESC)
|
||||
q++;
|
||||
@ -607,12 +621,12 @@ subevalvar(char *p, char *str, int strloc, int subtype, int startloc,
|
||||
|
||||
case VSTRIMRIGHTMAX:
|
||||
for (loc = startp; loc < str - 1; loc++) {
|
||||
if (patmatch(str, loc, varflags & VSQUOTE)) {
|
||||
if (patmatch(str, loc, quotes)) {
|
||||
amount = loc - expdest;
|
||||
STADJUST(amount, expdest);
|
||||
return 1;
|
||||
}
|
||||
if ((varflags & VSQUOTE) && *loc == CTLESC)
|
||||
if (quotes && *loc == CTLESC)
|
||||
loc++;
|
||||
}
|
||||
return 0;
|
||||
@ -742,7 +756,8 @@ evalvar(char *p, int flag)
|
||||
case VSPLUS:
|
||||
case VSMINUS:
|
||||
if (!set) {
|
||||
argstr(p, flag);
|
||||
argstr(p, flag | (flag & EXP_FULL ? EXP_SPLIT_LIT : 0) |
|
||||
(varflags & VSQUOTE ? EXP_LIT_QUOTED : 0));
|
||||
break;
|
||||
}
|
||||
if (easy)
|
||||
@ -762,7 +777,7 @@ evalvar(char *p, int flag)
|
||||
STPUTC('\0', expdest);
|
||||
patloc = expdest - stackblock();
|
||||
if (subevalvar(p, NULL, patloc, subtype,
|
||||
startloc, varflags) == 0) {
|
||||
startloc, varflags, quotes) == 0) {
|
||||
int amount = (expdest - stackblock() - patloc) + 1;
|
||||
STADJUST(-amount, expdest);
|
||||
}
|
||||
@ -773,7 +788,8 @@ evalvar(char *p, int flag)
|
||||
case VSASSIGN:
|
||||
case VSQUESTION:
|
||||
if (!set) {
|
||||
if (subevalvar(p, var, 0, subtype, startloc, varflags)) {
|
||||
if (subevalvar(p, var, 0, subtype, startloc, varflags,
|
||||
quotes)) {
|
||||
varflags &= ~VSNUL;
|
||||
/*
|
||||
* Remove any recorded regions beyond
|
||||
@ -1495,13 +1511,13 @@ rmescapes(char *str)
|
||||
char *p, *q;
|
||||
|
||||
p = str;
|
||||
while (*p != CTLESC && *p != CTLQUOTEMARK) {
|
||||
while (*p != CTLESC && *p != CTLQUOTEMARK && *p != CTLQUOTEEND) {
|
||||
if (*p++ == '\0')
|
||||
return;
|
||||
}
|
||||
q = p;
|
||||
while (*p) {
|
||||
if (*p == CTLQUOTEMARK) {
|
||||
if (*p == CTLQUOTEMARK || *p == CTLQUOTEEND) {
|
||||
p++;
|
||||
continue;
|
||||
}
|
||||
|
@ -52,6 +52,8 @@ struct arglist {
|
||||
#define EXP_VARTILDE 0x4 /* expand tildes in an assignment */
|
||||
#define EXP_REDIR 0x8 /* file glob for a redirection (1 match only) */
|
||||
#define EXP_CASE 0x10 /* keeps quotes around for CASE pattern */
|
||||
#define EXP_SPLIT_LIT 0x20 /* IFS split literal text ${v+-a b c} */
|
||||
#define EXP_LIT_QUOTED 0x40 /* for EXP_SPLIT_LIT, start off quoted */
|
||||
|
||||
|
||||
union node;
|
||||
|
@ -297,7 +297,7 @@ histcmd(int argc, char **argv)
|
||||
laststr = argv[1];
|
||||
break;
|
||||
default:
|
||||
error("too many args");
|
||||
error("too many arguments");
|
||||
}
|
||||
/*
|
||||
* Turn into event numbers.
|
||||
@ -329,7 +329,7 @@ histcmd(int argc, char **argv)
|
||||
editfile = editfilestr;
|
||||
if ((efp = fdopen(fd, "w")) == NULL) {
|
||||
close(fd);
|
||||
error("can't allocate stdio buffer for temp");
|
||||
error("Out of space");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -285,6 +285,7 @@ init(void)
|
||||
syntax[base + CTLARI] = "CCTL";
|
||||
syntax[base + CTLENDARI] = "CCTL";
|
||||
syntax[base + CTLQUOTEMARK] = "CCTL";
|
||||
syntax[base + CTLQUOTEEND] = "CCTL";
|
||||
}
|
||||
|
||||
|
||||
|
@ -106,7 +106,7 @@ static struct parser_temp *parser_temp;
|
||||
static int noaliases = 0;
|
||||
|
||||
|
||||
static union node *list(int);
|
||||
static union node *list(int, int);
|
||||
static union node *andor(void);
|
||||
static union node *pipeline(void);
|
||||
static union node *command(void);
|
||||
@ -220,20 +220,20 @@ parsecmd(int interact)
|
||||
if (t == TNL)
|
||||
return NULL;
|
||||
tokpushback++;
|
||||
return list(1);
|
||||
return list(1, 1);
|
||||
}
|
||||
|
||||
|
||||
static union node *
|
||||
list(int nlflag)
|
||||
list(int nlflag, int erflag)
|
||||
{
|
||||
union node *n1, *n2, *n3;
|
||||
union node *ntop, *n1, *n2, *n3;
|
||||
int tok;
|
||||
|
||||
checkkwd = 2;
|
||||
if (nlflag == 0 && tokendlist[peektoken()])
|
||||
if (!nlflag && !erflag && tokendlist[peektoken()])
|
||||
return NULL;
|
||||
n1 = NULL;
|
||||
ntop = n1 = NULL;
|
||||
for (;;) {
|
||||
n2 = andor();
|
||||
tok = readtoken();
|
||||
@ -250,14 +250,21 @@ list(int nlflag)
|
||||
n2 = n3;
|
||||
}
|
||||
}
|
||||
if (n1 == NULL) {
|
||||
n1 = n2;
|
||||
if (ntop == NULL)
|
||||
ntop = n2;
|
||||
else if (n1 == NULL) {
|
||||
n1 = (union node *)stalloc(sizeof (struct nbinary));
|
||||
n1->type = NSEMI;
|
||||
n1->nbinary.ch1 = ntop;
|
||||
n1->nbinary.ch2 = n2;
|
||||
ntop = n1;
|
||||
}
|
||||
else {
|
||||
n3 = (union node *)stalloc(sizeof (struct nbinary));
|
||||
n3->type = NSEMI;
|
||||
n3->nbinary.ch1 = n1;
|
||||
n3->nbinary.ch1 = n1->nbinary.ch2;
|
||||
n3->nbinary.ch2 = n2;
|
||||
n1->nbinary.ch2 = n3;
|
||||
n1 = n3;
|
||||
}
|
||||
switch (tok) {
|
||||
@ -269,28 +276,28 @@ list(int nlflag)
|
||||
if (tok == TNL) {
|
||||
parseheredoc();
|
||||
if (nlflag)
|
||||
return n1;
|
||||
return ntop;
|
||||
} else if (tok == TEOF && nlflag) {
|
||||
parseheredoc();
|
||||
return n1;
|
||||
return ntop;
|
||||
} else {
|
||||
tokpushback++;
|
||||
}
|
||||
checkkwd = 2;
|
||||
if (tokendlist[peektoken()])
|
||||
return n1;
|
||||
if (!nlflag && !erflag && tokendlist[peektoken()])
|
||||
return ntop;
|
||||
break;
|
||||
case TEOF:
|
||||
if (heredoclist)
|
||||
parseheredoc();
|
||||
else
|
||||
pungetc(); /* push back EOF on input */
|
||||
return n1;
|
||||
return ntop;
|
||||
default:
|
||||
if (nlflag)
|
||||
if (nlflag || erflag)
|
||||
synexpect(-1);
|
||||
tokpushback++;
|
||||
return n1;
|
||||
return ntop;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -398,24 +405,24 @@ command(void)
|
||||
case TIF:
|
||||
n1 = (union node *)stalloc(sizeof (struct nif));
|
||||
n1->type = NIF;
|
||||
if ((n1->nif.test = list(0)) == NULL)
|
||||
if ((n1->nif.test = list(0, 0)) == NULL)
|
||||
synexpect(-1);
|
||||
if (readtoken() != TTHEN)
|
||||
synexpect(TTHEN);
|
||||
n1->nif.ifpart = list(0);
|
||||
n1->nif.ifpart = list(0, 0);
|
||||
n2 = n1;
|
||||
while (readtoken() == TELIF) {
|
||||
n2->nif.elsepart = (union node *)stalloc(sizeof (struct nif));
|
||||
n2 = n2->nif.elsepart;
|
||||
n2->type = NIF;
|
||||
if ((n2->nif.test = list(0)) == NULL)
|
||||
if ((n2->nif.test = list(0, 0)) == NULL)
|
||||
synexpect(-1);
|
||||
if (readtoken() != TTHEN)
|
||||
synexpect(TTHEN);
|
||||
n2->nif.ifpart = list(0);
|
||||
n2->nif.ifpart = list(0, 0);
|
||||
}
|
||||
if (lasttoken == TELSE)
|
||||
n2->nif.elsepart = list(0);
|
||||
n2->nif.elsepart = list(0, 0);
|
||||
else {
|
||||
n2->nif.elsepart = NULL;
|
||||
tokpushback++;
|
||||
@ -429,13 +436,13 @@ command(void)
|
||||
int got;
|
||||
n1 = (union node *)stalloc(sizeof (struct nbinary));
|
||||
n1->type = (lasttoken == TWHILE)? NWHILE : NUNTIL;
|
||||
if ((n1->nbinary.ch1 = list(0)) == NULL)
|
||||
if ((n1->nbinary.ch1 = list(0, 0)) == NULL)
|
||||
synexpect(-1);
|
||||
if ((got=readtoken()) != TDO) {
|
||||
TRACE(("expecting DO got %s %s\n", tokname[got], got == TWORD ? wordtext : ""));
|
||||
synexpect(TDO);
|
||||
}
|
||||
n1->nbinary.ch2 = list(0);
|
||||
n1->nbinary.ch2 = list(0, 0);
|
||||
if (readtoken() != TDONE)
|
||||
synexpect(TDONE);
|
||||
checkkwd = 1;
|
||||
@ -487,7 +494,7 @@ TRACE(("expecting DO got %s %s\n", tokname[got], got == TWORD ? wordtext : ""));
|
||||
t = TEND;
|
||||
else
|
||||
synexpect(-1);
|
||||
n1->nfor.body = list(0);
|
||||
n1->nfor.body = list(0, 0);
|
||||
if (readtoken() != t)
|
||||
synexpect(t);
|
||||
checkkwd = 1;
|
||||
@ -527,7 +534,7 @@ TRACE(("expecting DO got %s %s\n", tokname[got], got == TWORD ? wordtext : ""));
|
||||
ap->narg.next = NULL;
|
||||
if (lasttoken != TRP)
|
||||
noaliases = 0, synexpect(TRP);
|
||||
cp->nclist.body = list(0);
|
||||
cp->nclist.body = list(0, 0);
|
||||
|
||||
checkkwd = 2;
|
||||
if ((t = readtoken()) != TESAC) {
|
||||
@ -545,14 +552,14 @@ TRACE(("expecting DO got %s %s\n", tokname[got], got == TWORD ? wordtext : ""));
|
||||
case TLP:
|
||||
n1 = (union node *)stalloc(sizeof (struct nredir));
|
||||
n1->type = NSUBSHELL;
|
||||
n1->nredir.n = list(0);
|
||||
n1->nredir.n = list(0, 0);
|
||||
n1->nredir.redirect = NULL;
|
||||
if (readtoken() != TRP)
|
||||
synexpect(TRP);
|
||||
checkkwd = 1;
|
||||
break;
|
||||
case TBEGIN:
|
||||
n1 = list(0);
|
||||
n1 = list(0, 0);
|
||||
if (readtoken() != TEND)
|
||||
synexpect(TEND);
|
||||
checkkwd = 1;
|
||||
@ -644,9 +651,13 @@ simplecmd(union node **rpp, union node *redir)
|
||||
/*
|
||||
* - Require plain text.
|
||||
* - Functions with '/' cannot be called.
|
||||
* - Reject name=().
|
||||
* - Reject ksh extended glob patterns.
|
||||
*/
|
||||
if (!noexpand(n->narg.text) || quoteflag ||
|
||||
strchr(n->narg.text, '/'))
|
||||
strchr(n->narg.text, '/') ||
|
||||
strchr("!%*+-=?@}~",
|
||||
n->narg.text[strlen(n->narg.text) - 1]))
|
||||
synerror("Bad function name");
|
||||
rmescapes(n->narg.text);
|
||||
if (find_builtin(n->narg.text, &special) >= 0 &&
|
||||
@ -1066,7 +1077,7 @@ parsebackq(char *out, struct nodelist **pbqlist,
|
||||
doprompt = 0;
|
||||
}
|
||||
|
||||
n = list(0);
|
||||
n = list(0, oldstyle);
|
||||
|
||||
if (oldstyle)
|
||||
doprompt = saveprompt;
|
||||
@ -1161,7 +1172,7 @@ readtoken1(int firstc, char const *initialsyntax, char *eofmark, int striptabs)
|
||||
loop: { /* for each line, until end of word */
|
||||
CHECKEND(); /* set c to PEOF if at end of here document */
|
||||
for (;;) { /* until end of line or end of word */
|
||||
CHECKSTRSPACE(3, out); /* permit 3 calls to USTPUTC */
|
||||
CHECKSTRSPACE(4, out); /* permit 4 calls to USTPUTC */
|
||||
|
||||
synentry = state[level].syntax[c];
|
||||
|
||||
@ -1203,12 +1214,18 @@ readtoken1(int firstc, char const *initialsyntax, char *eofmark, int striptabs)
|
||||
newvarnest == 0)) &&
|
||||
(c != '}' || state[level].category != TSTATE_VAR_OLD))
|
||||
USTPUTC('\\', out);
|
||||
if ((eofmark == NULL ||
|
||||
newvarnest > 0) &&
|
||||
state[level].syntax == BASESYNTAX)
|
||||
USTPUTC(CTLQUOTEMARK, out);
|
||||
if (SQSYNTAX[c] == CCTL)
|
||||
USTPUTC(CTLESC, out);
|
||||
else if (eofmark == NULL ||
|
||||
newvarnest > 0)
|
||||
USTPUTC(CTLQUOTEMARK, out);
|
||||
USTPUTC(c, out);
|
||||
if ((eofmark == NULL ||
|
||||
newvarnest > 0) &&
|
||||
state[level].syntax == BASESYNTAX &&
|
||||
state[level].category == TSTATE_VAR_OLD)
|
||||
USTPUTC(CTLQUOTEEND, out);
|
||||
quotef++;
|
||||
}
|
||||
break;
|
||||
@ -1224,6 +1241,8 @@ readtoken1(int firstc, char const *initialsyntax, char *eofmark, int striptabs)
|
||||
if (eofmark != NULL && newvarnest == 0)
|
||||
USTPUTC(c, out);
|
||||
else {
|
||||
if (state[level].category == TSTATE_VAR_OLD)
|
||||
USTPUTC(CTLQUOTEEND, out);
|
||||
state[level].syntax = BASESYNTAX;
|
||||
quotef++;
|
||||
}
|
||||
@ -1233,11 +1252,12 @@ readtoken1(int firstc, char const *initialsyntax, char *eofmark, int striptabs)
|
||||
break;
|
||||
case CENDVAR: /* '}' */
|
||||
if (level > 0 &&
|
||||
(state[level].category == TSTATE_VAR_OLD ||
|
||||
state[level].category == TSTATE_VAR_NEW)) {
|
||||
if (state[level].category == TSTATE_VAR_OLD)
|
||||
state[level - 1].syntax = state[level].syntax;
|
||||
else
|
||||
((state[level].category == TSTATE_VAR_OLD &&
|
||||
state[level].syntax ==
|
||||
state[level - 1].syntax) ||
|
||||
(state[level].category == TSTATE_VAR_NEW &&
|
||||
state[level].syntax == BASESYNTAX))) {
|
||||
if (state[level].category == TSTATE_VAR_NEW)
|
||||
newvarnest--;
|
||||
level--;
|
||||
USTPUTC(CTLENDVAR, out);
|
||||
@ -1725,7 +1745,7 @@ getprompt(void *unused __unused)
|
||||
char *fmt;
|
||||
const char *pwd;
|
||||
int i, trim;
|
||||
static char internal_error[] = "<internal prompt error>";
|
||||
static char internal_error[] = "??";
|
||||
|
||||
/*
|
||||
* Select prompt format.
|
||||
|
@ -43,6 +43,7 @@
|
||||
#define CTLARI '\206'
|
||||
#define CTLENDARI '\207'
|
||||
#define CTLQUOTEMARK '\210'
|
||||
#define CTLQUOTEEND '\211' /* only for ${v+-...} */
|
||||
|
||||
/* variable substitution byte (follows CTLVAR) */
|
||||
#define VSTYPE 0x0f /* type of variable substitution */
|
||||
|
28
bin/sh/sh.1
28
bin/sh/sh.1
@ -32,7 +32,7 @@
|
||||
.\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd October 16, 2010
|
||||
.Dd October 31, 2010
|
||||
.Dt SH 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -40,9 +40,24 @@
|
||||
.Nd command interpreter (shell)
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl /+abCEefIimnPpsTuVvx
|
||||
.Op Fl /+abCEefIimnPpTuVvx
|
||||
.Op Fl /+o Ar longname
|
||||
.Op Fl c Ar string
|
||||
.Oo
|
||||
.Ar script
|
||||
.Op Ar arg ...
|
||||
.Oc
|
||||
.Nm
|
||||
.Op Fl /+abCEefIimnPpTuVvx
|
||||
.Op Fl /+o Ar longname
|
||||
.Fl c Ar string
|
||||
.Oo
|
||||
.Ar name
|
||||
.Op Ar arg ...
|
||||
.Oc
|
||||
.Nm
|
||||
.Op Fl /+abCEefIimnPpTuVvx
|
||||
.Op Fl /+o Ar longname
|
||||
.Fl s
|
||||
.Op Ar arg ...
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
@ -1109,7 +1124,12 @@ the process ID and its exit status until the
|
||||
.Ic wait
|
||||
built-in command reports completion of the process.
|
||||
.It Li $0
|
||||
(zero) Expands to the name of the shell or shell script.
|
||||
(zero) Expands to the name of the shell script if passed on the command line,
|
||||
the
|
||||
.Ar name
|
||||
operand if given (with
|
||||
.Fl c )
|
||||
or otherwise argument 0 passed to the shell.
|
||||
.El
|
||||
.Ss Special Variables
|
||||
The following variables are set by the shell or
|
||||
|
@ -826,7 +826,7 @@ setvarcmd(int argc, char **argv)
|
||||
else if (argc == 3)
|
||||
setvar(argv[1], argv[2], 0);
|
||||
else
|
||||
error("List assignment not implemented");
|
||||
error("too many arguments");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -3362,8 +3362,7 @@ ztest_verify_blocks(char *pool)
|
||||
int isalen;
|
||||
FILE *fp;
|
||||
|
||||
if (realpath(progname, zdb) == NULL)
|
||||
assert(!"realpath() failed");
|
||||
strlcpy(zdb, "/usr/bin/ztest", sizeof(zdb));
|
||||
|
||||
/* zdb lives in /usr/sbin, while ztest lives in /usr/bin */
|
||||
bin = strstr(zdb, "/usr/bin/");
|
||||
|
@ -308,9 +308,9 @@ cv_timedwait(kcondvar_t *cv, kmutex_t *mp, clock_t abstime)
|
||||
struct timeval tv;
|
||||
clock_t delta;
|
||||
|
||||
ASSERT(abstime > 0);
|
||||
abstime += lbolt;
|
||||
top:
|
||||
delta = abstime;
|
||||
delta = abstime - lbolt;
|
||||
if (delta <= 0)
|
||||
return (-1);
|
||||
|
||||
@ -321,7 +321,7 @@ cv_timedwait(kcondvar_t *cv, kmutex_t *mp, clock_t abstime)
|
||||
ts.tv_nsec = tv.tv_usec * 1000 + (delta % hz) * (NANOSEC / hz);
|
||||
ASSERT(ts.tv_nsec >= 0);
|
||||
|
||||
if(ts.tv_nsec >= NANOSEC) {
|
||||
if (ts.tv_nsec >= NANOSEC) {
|
||||
ts.tv_sec++;
|
||||
ts.tv_nsec -= NANOSEC;
|
||||
}
|
||||
|
@ -16,6 +16,6 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
|
||||
-I${OPENSOLARIS_USR_DISTDIR}/lib/libctf/common \
|
||||
-I${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common \
|
||||
-I${OPENSOLARIS_SYS_DISTDIR}/uts/common \
|
||||
-DPIC -fpic
|
||||
-DPIC ${PICFLAG}
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
@ -1,9 +1,48 @@
|
||||
--- 9.6.2-P2 released ---
|
||||
--- 9.6-ESV-R2 released ---
|
||||
|
||||
2939. [func] Check that named successfully skips NSEC3 records
|
||||
that fail to match the NSEC3PARAM record currently
|
||||
in use. [RT# 21868]
|
||||
|
||||
2937. [bug] Worked around an apparent race condition in over
|
||||
memory conditions. Without this fix a DNS cache DB or
|
||||
ADB could incorrectly stay in an over memory state,
|
||||
effectively refusing further caching, which
|
||||
subsequently made a BIND 9 caching server unworkable.
|
||||
This fix prevents this problem from happening by
|
||||
polling the state of the memory context, rather than
|
||||
making a copy of the state, which appeared to cause
|
||||
a race. This is a "workaround" in that it doesn't
|
||||
solve the possible race per se, but several experiments
|
||||
proved this change solves the symptom. Also, the
|
||||
polling overhead hasn't been reported to be an issue.
|
||||
This bug should only affect a caching server that
|
||||
specifies a finite max-cache-size. It's also quite
|
||||
likely that the bug happens only when enabling threads,
|
||||
but it's not confirmed yet. [RT #21818]
|
||||
|
||||
2925. [bug] Named failed to accept uncachable negative responses
|
||||
from insecure zones. [RT# 21555]
|
||||
|
||||
2921. [bug] The resolver could attempt to destroy a fetch context
|
||||
too soon. [RT #19878]
|
||||
|
||||
2900. [bug] The placeholder negative caching element was not
|
||||
properly constructed triggering a INSIST in
|
||||
dns_ncache_towire(). [RT #21346]
|
||||
|
||||
2890. [bug] Handle the introduction of new trusted-keys and
|
||||
DS, DLV RRsets better. [RT #21097]
|
||||
|
||||
2869. [bug] Fix arguments to dns_keytable_findnextkeynode() call.
|
||||
[RT #20877]
|
||||
|
||||
--- 9.6-ESV-R1 released ---
|
||||
|
||||
2876. [bug] Named could return SERVFAIL for negative responses
|
||||
from unsigned zones. [RT #21131]
|
||||
|
||||
--- 9.6.2-P1 released ---
|
||||
--- 9.6-ESV released ---
|
||||
|
||||
2852. [bug] Handle broken DNSSEC trust chains better. [RT #15619]
|
||||
|
||||
|
@ -42,6 +42,12 @@ BIND 9
|
||||
Stichting NLnet - NLnet Foundation
|
||||
Nominum, Inc.
|
||||
|
||||
BIND 9.6-ESV (Extended Support Version)
|
||||
|
||||
BIND 9.6-ESV will be supported until March 31, 2013, at
|
||||
which time you will need to upgrade to the current release
|
||||
of BIND.
|
||||
|
||||
BIND 9.6.2
|
||||
|
||||
BIND 9.6.2 is a maintenance release, fixing bugs in 9.6.1.
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
- Copyright (C) 2008 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2008, 2010 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- Permission to use, copy, modify, and/or distribute this software for any
|
||||
- purpose with or without fee is hereby granted, provided that the above
|
||||
@ -14,7 +14,7 @@
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- $Id: dnssec-dsfromkey.html,v 1.5 2008/11/08 01:11:47 tbox Exp $ -->
|
||||
<!-- $Id: dnssec-dsfromkey.html,v 1.5.110.2 2010/03/03 23:32:17 tbox Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
@ -33,14 +33,14 @@
|
||||
<div class="cmdsynopsis"><p><code class="command">dnssec-dsfromkey</code> {-s} [<code class="option">-v <em class="replaceable"><code>level</code></em></code>] [<code class="option">-1</code>] [<code class="option">-2</code>] [<code class="option">-a <em class="replaceable"><code>alg</code></em></code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-d <em class="replaceable"><code>dir</code></em></code>] {dnsname}</p></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543424"></a><h2>DESCRIPTION</h2>
|
||||
<a name="id2543421"></a><h2>DESCRIPTION</h2>
|
||||
<p><span><strong class="command">dnssec-dsfromkey</strong></span>
|
||||
outputs the Delegation Signer (DS) resource record (RR), as defined in
|
||||
RFC 3658 and RFC 4509, for the given key(s).
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543435"></a><h2>OPTIONS</h2>
|
||||
<a name="id2543433"></a><h2>OPTIONS</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">-1</span></dt>
|
||||
<dd><p>
|
||||
@ -81,7 +81,7 @@
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543563"></a><h2>EXAMPLE</h2>
|
||||
<a name="id2543561"></a><h2>EXAMPLE</h2>
|
||||
<p>
|
||||
To build the SHA-256 DS RR from the
|
||||
<strong class="userinput"><code>Kexample.com.+003+26160</code></strong>
|
||||
@ -96,7 +96,7 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543593"></a><h2>FILES</h2>
|
||||
<a name="id2543591"></a><h2>FILES</h2>
|
||||
<p>
|
||||
The keyfile can be designed by the key identification
|
||||
<code class="filename">Knnnn.+aaa+iiiii</code> or the full file name
|
||||
@ -110,13 +110,13 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543628"></a><h2>CAVEAT</h2>
|
||||
<a name="id2543626"></a><h2>CAVEAT</h2>
|
||||
<p>
|
||||
A keyfile error can give a "file not found" even if the file exists.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543638"></a><h2>SEE ALSO</h2>
|
||||
<a name="id2543636"></a><h2>SEE ALSO</h2>
|
||||
<p><span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
|
||||
<span class="citerefentry"><span class="refentrytitle">dnssec-signzone</span>(8)</span>,
|
||||
<em class="citetitle">BIND 9 Administrator Reference Manual</em>,
|
||||
@ -125,7 +125,7 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543674"></a><h2>AUTHOR</h2>
|
||||
<a name="id2543672"></a><h2>AUTHOR</h2>
|
||||
<p><span class="corpauthor">Internet Systems Consortium</span>
|
||||
</p>
|
||||
</div>
|
||||
|
@ -13,7 +13,7 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: dnssec-keyfromlabel.html,v 1.5.44.3 2010/01/16 01:55:32 tbox Exp $ -->
|
||||
<!-- $Id: dnssec-keyfromlabel.html,v 1.5.44.3.4.1 2010/03/03 22:19:19 tbox Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
@ -31,7 +31,7 @@
|
||||
<div class="cmdsynopsis"><p><code class="command">dnssec-keyfromlabel</code> {-a <em class="replaceable"><code>algorithm</code></em>} {-l <em class="replaceable"><code>label</code></em>} [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-f <em class="replaceable"><code>flag</code></em></code>] [<code class="option">-k</code>] [<code class="option">-n <em class="replaceable"><code>nametype</code></em></code>] [<code class="option">-p <em class="replaceable"><code>protocol</code></em></code>] [<code class="option">-t <em class="replaceable"><code>type</code></em></code>] [<code class="option">-v <em class="replaceable"><code>level</code></em></code>] {name}</p></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543416"></a><h2>DESCRIPTION</h2>
|
||||
<a name="id2543414"></a><h2>DESCRIPTION</h2>
|
||||
<p><span><strong class="command">dnssec-keyfromlabel</strong></span>
|
||||
gets keys with the given label from a crypto hardware and builds
|
||||
key files for DNSSEC (Secure DNS), as defined in RFC 2535
|
||||
@ -39,7 +39,7 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543428"></a><h2>OPTIONS</h2>
|
||||
<a name="id2543426"></a><h2>OPTIONS</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">-a <em class="replaceable"><code>algorithm</code></em></span></dt>
|
||||
<dd>
|
||||
@ -120,7 +120,7 @@
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543632"></a><h2>GENERATED KEY FILES</h2>
|
||||
<a name="id2543629"></a><h2>GENERATED KEY FILES</h2>
|
||||
<p>
|
||||
When <span><strong class="command">dnssec-keyfromlabel</strong></span> completes
|
||||
successfully,
|
||||
@ -161,7 +161,7 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543704"></a><h2>SEE ALSO</h2>
|
||||
<a name="id2543702"></a><h2>SEE ALSO</h2>
|
||||
<p><span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
|
||||
<span class="citerefentry"><span class="refentrytitle">dnssec-signzone</span>(8)</span>,
|
||||
<em class="citetitle">BIND 9 Administrator Reference Manual</em>,
|
||||
@ -169,7 +169,7 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543737"></a><h2>AUTHOR</h2>
|
||||
<a name="id2543735"></a><h2>AUTHOR</h2>
|
||||
<p><span class="corpauthor">Internet Systems Consortium</span>
|
||||
</p>
|
||||
</div>
|
||||
|
@ -14,7 +14,7 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: dnssec-keygen.html,v 1.32.44.4 2010/01/16 01:55:32 tbox Exp $ -->
|
||||
<!-- $Id: dnssec-keygen.html,v 1.32.44.4.4.1 2010/03/03 22:19:19 tbox Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
@ -32,7 +32,7 @@
|
||||
<div class="cmdsynopsis"><p><code class="command">dnssec-keygen</code> {-a <em class="replaceable"><code>algorithm</code></em>} {-b <em class="replaceable"><code>keysize</code></em>} {-n <em class="replaceable"><code>nametype</code></em>} [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-e</code>] [<code class="option">-f <em class="replaceable"><code>flag</code></em></code>] [<code class="option">-g <em class="replaceable"><code>generator</code></em></code>] [<code class="option">-h</code>] [<code class="option">-k</code>] [<code class="option">-p <em class="replaceable"><code>protocol</code></em></code>] [<code class="option">-r <em class="replaceable"><code>randomdev</code></em></code>] [<code class="option">-s <em class="replaceable"><code>strength</code></em></code>] [<code class="option">-t <em class="replaceable"><code>type</code></em></code>] [<code class="option">-v <em class="replaceable"><code>level</code></em></code>] {name}</p></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543483"></a><h2>DESCRIPTION</h2>
|
||||
<a name="id2543481"></a><h2>DESCRIPTION</h2>
|
||||
<p><span><strong class="command">dnssec-keygen</strong></span>
|
||||
generates keys for DNSSEC (Secure DNS), as defined in RFC 2535
|
||||
and RFC 4034. It can also generate keys for use with
|
||||
@ -45,7 +45,7 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543501"></a><h2>OPTIONS</h2>
|
||||
<a name="id2543499"></a><h2>OPTIONS</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">-a <em class="replaceable"><code>algorithm</code></em></span></dt>
|
||||
<dd>
|
||||
@ -155,7 +155,7 @@
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543836"></a><h2>GENERATED KEYS</h2>
|
||||
<a name="id2543834"></a><h2>GENERATED KEYS</h2>
|
||||
<p>
|
||||
When <span><strong class="command">dnssec-keygen</strong></span> completes
|
||||
successfully,
|
||||
@ -201,7 +201,7 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543918"></a><h2>EXAMPLE</h2>
|
||||
<a name="id2543916"></a><h2>EXAMPLE</h2>
|
||||
<p>
|
||||
To generate a 768-bit DSA key for the domain
|
||||
<strong class="userinput"><code>example.com</code></strong>, the following command would be
|
||||
@ -222,7 +222,7 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2544030"></a><h2>SEE ALSO</h2>
|
||||
<a name="id2544028"></a><h2>SEE ALSO</h2>
|
||||
<p><span class="citerefentry"><span class="refentrytitle">dnssec-signzone</span>(8)</span>,
|
||||
<em class="citetitle">BIND 9 Administrator Reference Manual</em>,
|
||||
<em class="citetitle">RFC 2539</em>,
|
||||
@ -231,7 +231,7 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2544061"></a><h2>AUTHOR</h2>
|
||||
<a name="id2544059"></a><h2>AUTHOR</h2>
|
||||
<p><span class="corpauthor">Internet Systems Consortium</span>
|
||||
</p>
|
||||
</div>
|
||||
|
@ -14,7 +14,7 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: dnssec-signzone.html,v 1.33.44.8 2009/11/07 01:56:11 tbox Exp $ -->
|
||||
<!-- $Id: dnssec-signzone.html,v 1.33.44.8.10.1 2010/03/03 22:19:19 tbox Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
@ -32,7 +32,7 @@
|
||||
<div class="cmdsynopsis"><p><code class="command">dnssec-signzone</code> [<code class="option">-a</code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-d <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-e <em class="replaceable"><code>end-time</code></em></code>] [<code class="option">-f <em class="replaceable"><code>output-file</code></em></code>] [<code class="option">-g</code>] [<code class="option">-h</code>] [<code class="option">-k <em class="replaceable"><code>key</code></em></code>] [<code class="option">-l <em class="replaceable"><code>domain</code></em></code>] [<code class="option">-i <em class="replaceable"><code>interval</code></em></code>] [<code class="option">-I <em class="replaceable"><code>input-format</code></em></code>] [<code class="option">-j <em class="replaceable"><code>jitter</code></em></code>] [<code class="option">-N <em class="replaceable"><code>soa-serial-format</code></em></code>] [<code class="option">-o <em class="replaceable"><code>origin</code></em></code>] [<code class="option">-O <em class="replaceable"><code>output-format</code></em></code>] [<code class="option">-p</code>] [<code class="option">-P</code>] [<code class="option">-r <em class="replaceable"><code>randomdev</code></em></code>] [<code class="option">-s <em class="replaceable"><code>start-time</code></em></code>] [<code class="option">-t</code>] [<code class="option">-v <em class="replaceable"><code>level</code></em></code>] [<code class="option">-z</code>] [<code class="option">-3 <em class="replaceable"><code>salt</code></em></code>] [<code class="option">-H <em class="replaceable"><code>iterations</code></em></code>] [<code class="option">-A</code>] {zonefile} [key...]</p></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543558"></a><h2>DESCRIPTION</h2>
|
||||
<a name="id2543556"></a><h2>DESCRIPTION</h2>
|
||||
<p><span><strong class="command">dnssec-signzone</strong></span>
|
||||
signs a zone. It generates
|
||||
NSEC and RRSIG records and produces a signed version of the
|
||||
@ -43,7 +43,7 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543576"></a><h2>OPTIONS</h2>
|
||||
<a name="id2543574"></a><h2>OPTIONS</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">-a</span></dt>
|
||||
<dd><p>
|
||||
@ -273,7 +273,7 @@
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2544503"></a><h2>EXAMPLE</h2>
|
||||
<a name="id2544433"></a><h2>EXAMPLE</h2>
|
||||
<p>
|
||||
The following command signs the <strong class="userinput"><code>example.com</code></strong>
|
||||
zone with the DSA key generated by <span><strong class="command">dnssec-keygen</strong></span>
|
||||
@ -302,7 +302,7 @@ db.example.com.signed
|
||||
%</pre>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2544554"></a><h2>KNOWN BUGS</h2>
|
||||
<a name="id2544552"></a><h2>KNOWN BUGS</h2>
|
||||
<p>
|
||||
<span><strong class="command">dnssec-signzone</strong></span> was designed so that it could
|
||||
sign a zone partially, using only a subset of the DNSSEC keys
|
||||
@ -327,14 +327,14 @@ db.example.com.signed
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2544716"></a><h2>SEE ALSO</h2>
|
||||
<a name="id2544714"></a><h2>SEE ALSO</h2>
|
||||
<p><span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
|
||||
<em class="citetitle">BIND 9 Administrator Reference Manual</em>,
|
||||
<em class="citetitle">RFC 4033</em>.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2544741"></a><h2>AUTHOR</h2>
|
||||
<a name="id2544739"></a><h2>AUTHOR</h2>
|
||||
<p><span class="corpauthor">Internet Systems Consortium</span>
|
||||
</p>
|
||||
</div>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004-2008, 2010 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1999-2003 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: globals.h,v 1.80 2008/11/16 22:49:18 marka Exp $ */
|
||||
/* $Id: globals.h,v 1.80.84.2 2010/06/26 23:46:15 tbox Exp $ */
|
||||
|
||||
#ifndef NAMED_GLOBALS_H
|
||||
#define NAMED_GLOBALS_H 1
|
||||
@ -132,6 +132,7 @@ EXTERN int ns_g_listen INIT(3);
|
||||
EXTERN isc_time_t ns_g_boottime;
|
||||
EXTERN isc_boolean_t ns_g_memstatistics INIT(ISC_FALSE);
|
||||
EXTERN isc_boolean_t ns_g_clienttest INIT(ISC_FALSE);
|
||||
EXTERN isc_boolean_t ns_g_nosoa INIT(ISC_FALSE);
|
||||
|
||||
#undef EXTERN
|
||||
#undef INIT
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1999-2003 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: main.c,v 1.166.34.3 2009/04/03 20:18:59 marka Exp $ */
|
||||
/* $Id: main.c,v 1.166.34.3.24.3 2010/09/06 03:58:32 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
@ -446,13 +446,15 @@ parse_command_line(int argc, char *argv[]) {
|
||||
/* XXXJAB should we make a copy? */
|
||||
ns_g_chrootdir = isc_commandline_argument;
|
||||
break;
|
||||
case 'T':
|
||||
case 'T': /* NOT DOCUMENTED */
|
||||
/*
|
||||
* clienttest: make clients single shot with their
|
||||
* own memory context.
|
||||
*/
|
||||
if (strcmp(isc_commandline_argument, "clienttest") == 0)
|
||||
ns_g_clienttest = ISC_TRUE;
|
||||
else if (!strcmp(isc_commandline_argument, "nosoa"))
|
||||
ns_g_nosoa = ISC_TRUE;
|
||||
else
|
||||
fprintf(stderr, "unknown -T flag '%s\n",
|
||||
isc_commandline_argument);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1999-2003 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: query.c,v 1.313.20.16 2009/12/30 08:34:29 jinmei Exp $ */
|
||||
/* $Id: query.c,v 1.313.20.16.10.2 2010/06/26 23:46:14 tbox Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
@ -56,6 +56,7 @@
|
||||
#include <dns/zt.h>
|
||||
|
||||
#include <named/client.h>
|
||||
#include <named/globals.h>
|
||||
#include <named/log.h>
|
||||
#include <named/server.h>
|
||||
#include <named/sortlist.h>
|
||||
@ -2038,7 +2039,7 @@ query_addrrset(ns_client_t *client, dns_name_t **namep,
|
||||
|
||||
static inline isc_result_t
|
||||
query_addsoa(ns_client_t *client, dns_db_t *db, dns_dbversion_t *version,
|
||||
isc_boolean_t zero_ttl)
|
||||
isc_boolean_t zero_ttl, isc_boolean_t isassociated)
|
||||
{
|
||||
dns_name_t *name;
|
||||
dns_dbnode_t *node;
|
||||
@ -2055,6 +2056,12 @@ query_addsoa(ns_client_t *client, dns_db_t *db, dns_dbversion_t *version,
|
||||
rdataset = NULL;
|
||||
node = NULL;
|
||||
|
||||
/*
|
||||
* Don't add the SOA record for test which set "-T nosoa".
|
||||
*/
|
||||
if (ns_g_nosoa && (!WANTDNSSEC(client) || !isassociated))
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
/*
|
||||
* Get resources and make 'name' be the database origin.
|
||||
*/
|
||||
@ -4324,7 +4331,8 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
|
||||
/*
|
||||
* Add SOA.
|
||||
*/
|
||||
result = query_addsoa(client, db, version, ISC_FALSE);
|
||||
result = query_addsoa(client, db, version, ISC_FALSE,
|
||||
dns_rdataset_isassociated(rdataset));
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
QUERY_ERROR(result);
|
||||
goto cleanup;
|
||||
@ -4372,9 +4380,11 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
|
||||
zone != NULL &&
|
||||
#endif
|
||||
dns_zone_getzeronosoattl(zone))
|
||||
result = query_addsoa(client, db, version, ISC_TRUE);
|
||||
result = query_addsoa(client, db, version, ISC_TRUE,
|
||||
dns_rdataset_isassociated(rdataset));
|
||||
else
|
||||
result = query_addsoa(client, db, version, ISC_FALSE);
|
||||
result = query_addsoa(client, db, version, ISC_FALSE,
|
||||
dns_rdataset_isassociated(rdataset));
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
QUERY_ERROR(result);
|
||||
goto cleanup;
|
||||
@ -4742,7 +4752,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
|
||||
* Add SOA.
|
||||
*/
|
||||
result = query_addsoa(client, db, version,
|
||||
ISC_FALSE);
|
||||
ISC_FALSE, ISC_FALSE);
|
||||
if (result == ISC_R_SUCCESS)
|
||||
result = ISC_R_NOMORE;
|
||||
} else {
|
||||
|
@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: server.c,v 1.520.12.11.8.2 2010/02/25 10:57:11 tbox Exp $ */
|
||||
/* $Id: server.c,v 1.520.12.11.10.1 2010/03/03 22:06:36 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: nsupdate.html,v 1.40.48.3 2009/07/11 01:55:21 tbox Exp $ -->
|
||||
<!-- $Id: nsupdate.html,v 1.40.48.3.10.1 2010/03/03 22:19:19 tbox Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
@ -32,7 +32,7 @@
|
||||
<div class="cmdsynopsis"><p><code class="command">nsupdate</code> [<code class="option">-d</code>] [<code class="option">-D</code>] [[<code class="option">-g</code>] | [<code class="option">-o</code>] | [<code class="option">-y <em class="replaceable"><code>[<span class="optional">hmac:</span>]keyname:secret</code></em></code>] | [<code class="option">-k <em class="replaceable"><code>keyfile</code></em></code>]] [<code class="option">-t <em class="replaceable"><code>timeout</code></em></code>] [<code class="option">-u <em class="replaceable"><code>udptimeout</code></em></code>] [<code class="option">-r <em class="replaceable"><code>udpretries</code></em></code>] [<code class="option">-R <em class="replaceable"><code>randomdev</code></em></code>] [<code class="option">-v</code>] [filename]</p></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543449"></a><h2>DESCRIPTION</h2>
|
||||
<a name="id2543447"></a><h2>DESCRIPTION</h2>
|
||||
<p><span><strong class="command">nsupdate</strong></span>
|
||||
is used to submit Dynamic DNS Update requests as defined in RFC2136
|
||||
to a name server.
|
||||
@ -169,7 +169,7 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543726"></a><h2>INPUT FORMAT</h2>
|
||||
<a name="id2543724"></a><h2>INPUT FORMAT</h2>
|
||||
<p><span><strong class="command">nsupdate</strong></span>
|
||||
reads input from
|
||||
<em class="parameter"><code>filename</code></em>
|
||||
@ -433,7 +433,7 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2544567"></a><h2>EXAMPLES</h2>
|
||||
<a name="id2544565"></a><h2>EXAMPLES</h2>
|
||||
<p>
|
||||
The examples below show how
|
||||
<span><strong class="command">nsupdate</strong></span>
|
||||
@ -487,7 +487,7 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2544611"></a><h2>FILES</h2>
|
||||
<a name="id2544609"></a><h2>FILES</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term"><code class="constant">/etc/resolv.conf</code></span></dt>
|
||||
<dd><p>
|
||||
@ -506,7 +506,7 @@
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2544680"></a><h2>SEE ALSO</h2>
|
||||
<a name="id2544678"></a><h2>SEE ALSO</h2>
|
||||
<p><span class="citerefentry"><span class="refentrytitle">RFC2136</span></span>,
|
||||
<span class="citerefentry"><span class="refentrytitle">RFC3007</span></span>,
|
||||
<span class="citerefentry"><span class="refentrytitle">RFC2104</span></span>,
|
||||
@ -519,7 +519,7 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2542156"></a><h2>BUGS</h2>
|
||||
<a name="id2542154"></a><h2>BUGS</h2>
|
||||
<p>
|
||||
The TSIG key is redundantly stored in two separate files.
|
||||
This is a consequence of nsupdate using the DST library
|
||||
|
@ -18,7 +18,7 @@
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- File: $Id: Bv9ARM-book.xml,v 1.380.14.24.2.1 2010/02/25 05:39:32 marka Exp $ -->
|
||||
<!-- File: $Id: Bv9ARM-book.xml,v 1.380.14.24.4.1 2010/03/03 22:06:36 marka Exp $ -->
|
||||
<book xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<title>BIND 9 Administrator Reference Manual</title>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: Bv9ARM.ch06.html,v 1.201.14.18.2.1 2010/02/25 12:16:44 tbox Exp $ -->
|
||||
<!-- $Id: Bv9ARM.ch06.html,v 1.201.14.18.4.1 2010/03/03 22:06:37 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
|
@ -14,7 +14,7 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: Bv9ARM.ch07.html,v 1.178.14.13.2.1 2010/02/25 12:16:47 tbox Exp $ -->
|
||||
<!-- $Id: Bv9ARM.ch07.html,v 1.178.14.13.4.1 2010/03/03 22:06:37 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
|
@ -14,7 +14,7 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: Bv9ARM.ch08.html,v 1.178.14.13.2.1 2010/02/25 12:16:47 tbox Exp $ -->
|
||||
<!-- $Id: Bv9ARM.ch08.html,v 1.178.14.13.4.1 2010/03/03 22:06:37 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
|
@ -14,7 +14,7 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: Bv9ARM.ch09.html,v 1.180.16.14.2.1 2010/02/25 12:16:47 tbox Exp $ -->
|
||||
<!-- $Id: Bv9ARM.ch09.html,v 1.180.16.14.4.1 2010/03/03 22:06:38 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
|
@ -14,7 +14,7 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: Bv9ARM.html,v 1.193.14.14.2.1 2010/02/25 12:16:48 tbox Exp $ -->
|
||||
<!-- $Id: Bv9ARM.html,v 1.193.14.14.4.1 2010/03/03 22:06:38 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Binary file not shown.
@ -14,7 +14,7 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: man.dig.html,v 1.93.14.15.2.1 2010/02/25 12:16:48 tbox Exp $ -->
|
||||
<!-- $Id: man.dig.html,v 1.93.14.15.4.1 2010/03/03 22:06:38 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
|
@ -14,7 +14,7 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: man.dnssec-dsfromkey.html,v 1.6.14.14.2.1 2010/02/25 12:16:49 tbox Exp $ -->
|
||||
<!-- $Id: man.dnssec-dsfromkey.html,v 1.6.14.14.4.1 2010/03/03 22:06:38 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
|
@ -14,7 +14,7 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: man.dnssec-keyfromlabel.html,v 1.31.14.17.2.1 2010/02/25 12:16:49 tbox Exp $ -->
|
||||
<!-- $Id: man.dnssec-keyfromlabel.html,v 1.31.14.17.4.1 2010/03/03 22:06:38 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
|
@ -14,7 +14,7 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: man.dnssec-keygen.html,v 1.97.14.17.2.1 2010/02/25 12:16:49 tbox Exp $ -->
|
||||
<!-- $Id: man.dnssec-keygen.html,v 1.97.14.17.4.1 2010/03/03 22:06:38 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
|
@ -14,7 +14,7 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: man.dnssec-signzone.html,v 1.94.14.23.2.1 2010/02/25 12:16:49 tbox Exp $ -->
|
||||
<!-- $Id: man.dnssec-signzone.html,v 1.94.14.23.4.1 2010/03/03 22:06:38 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
|
@ -14,7 +14,7 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: man.host.html,v 1.93.14.15.2.1 2010/02/25 12:16:49 tbox Exp $ -->
|
||||
<!-- $Id: man.host.html,v 1.93.14.15.4.1 2010/03/03 22:06:38 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
|
@ -14,7 +14,7 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: man.named-checkconf.html,v 1.92.14.20.2.1 2010/02/25 12:16:49 tbox Exp $ -->
|
||||
<!-- $Id: man.named-checkconf.html,v 1.92.14.20.4.1 2010/03/03 22:06:38 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
|
@ -14,7 +14,7 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: man.named-checkzone.html,v 1.98.14.20.2.1 2010/02/25 12:16:49 tbox Exp $ -->
|
||||
<!-- $Id: man.named-checkzone.html,v 1.98.14.20.4.1 2010/03/03 22:06:38 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
|
@ -14,7 +14,7 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: man.named.html,v 1.99.14.20.2.1 2010/02/25 12:16:49 tbox Exp $ -->
|
||||
<!-- $Id: man.named.html,v 1.99.14.20.4.1 2010/03/03 22:06:38 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
|
@ -14,7 +14,7 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: man.nsupdate.html,v 1.22.14.21.2.1 2010/02/25 12:16:49 tbox Exp $ -->
|
||||
<!-- $Id: man.nsupdate.html,v 1.22.14.21.4.1 2010/03/03 22:06:38 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
|
@ -14,7 +14,7 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: man.rndc-confgen.html,v 1.102.14.21.2.1 2010/02/25 12:16:49 tbox Exp $ -->
|
||||
<!-- $Id: man.rndc-confgen.html,v 1.102.14.21.4.1 2010/03/03 22:06:38 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
|
@ -14,7 +14,7 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: man.rndc.conf.html,v 1.103.14.21.2.1 2010/02/25 12:16:49 tbox Exp $ -->
|
||||
<!-- $Id: man.rndc.conf.html,v 1.103.14.21.4.1 2010/03/03 22:06:38 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
|
@ -14,7 +14,7 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: man.rndc.html,v 1.101.14.21.2.1 2010/02/25 12:16:49 tbox Exp $ -->
|
||||
<!-- $Id: man.rndc.html,v 1.101.14.21.4.1 2010/03/03 22:06:39 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1999-2003 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: adb.c,v 1.243.42.4 2009/02/03 22:34:28 jinmei Exp $ */
|
||||
/* $Id: adb.c,v 1.243.42.4.24.2 2010/08/12 23:46:24 tbox Exp $ */
|
||||
|
||||
/*! \file
|
||||
*
|
||||
@ -118,7 +118,6 @@ struct dns_adb {
|
||||
|
||||
isc_taskmgr_t *taskmgr;
|
||||
isc_task_t *task;
|
||||
isc_boolean_t overmem;
|
||||
|
||||
isc_interval_t tick_interval;
|
||||
int next_cleanbucket;
|
||||
@ -294,8 +293,8 @@ static inline void inc_adb_irefcnt(dns_adb_t *);
|
||||
static inline void inc_adb_erefcnt(dns_adb_t *);
|
||||
static inline void inc_entry_refcnt(dns_adb_t *, dns_adbentry_t *,
|
||||
isc_boolean_t);
|
||||
static inline isc_boolean_t dec_entry_refcnt(dns_adb_t *, dns_adbentry_t *,
|
||||
isc_boolean_t);
|
||||
static inline isc_boolean_t dec_entry_refcnt(dns_adb_t *, isc_boolean_t,
|
||||
dns_adbentry_t *, isc_boolean_t);
|
||||
static inline void violate_locking_hierarchy(isc_mutex_t *, isc_mutex_t *);
|
||||
static isc_boolean_t clean_namehooks(dns_adb_t *, dns_adbnamehooklist_t *);
|
||||
static void clean_target(dns_adb_t *, dns_name_t *);
|
||||
@ -777,7 +776,7 @@ link_entry(dns_adb_t *adb, int bucket, dns_adbentry_t *entry) {
|
||||
int i;
|
||||
dns_adbentry_t *e;
|
||||
|
||||
if (adb->overmem) {
|
||||
if (isc_mem_isovermem(adb->mctx)) {
|
||||
for (i = 0; i < 2; i++) {
|
||||
e = ISC_LIST_TAIL(adb->entries[bucket]);
|
||||
if (e == NULL)
|
||||
@ -943,6 +942,7 @@ clean_namehooks(dns_adb_t *adb, dns_adbnamehooklist_t *namehooks) {
|
||||
dns_adbnamehook_t *namehook;
|
||||
int addr_bucket;
|
||||
isc_boolean_t result = ISC_FALSE;
|
||||
isc_boolean_t overmem = isc_mem_isovermem(adb->mctx);
|
||||
|
||||
addr_bucket = DNS_ADB_INVALIDBUCKET;
|
||||
namehook = ISC_LIST_HEAD(*namehooks);
|
||||
@ -963,7 +963,8 @@ clean_namehooks(dns_adb_t *adb, dns_adbnamehooklist_t *namehooks) {
|
||||
LOCK(&adb->entrylocks[addr_bucket]);
|
||||
}
|
||||
|
||||
result = dec_entry_refcnt(adb, entry, ISC_FALSE);
|
||||
result = dec_entry_refcnt(adb, overmem, entry,
|
||||
ISC_FALSE);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1235,7 +1236,9 @@ inc_entry_refcnt(dns_adb_t *adb, dns_adbentry_t *entry, isc_boolean_t lock) {
|
||||
}
|
||||
|
||||
static inline isc_boolean_t
|
||||
dec_entry_refcnt(dns_adb_t *adb, dns_adbentry_t *entry, isc_boolean_t lock) {
|
||||
dec_entry_refcnt(dns_adb_t *adb, isc_boolean_t overmem, dns_adbentry_t *entry,
|
||||
isc_boolean_t lock)
|
||||
{
|
||||
int bucket;
|
||||
isc_boolean_t destroy_entry;
|
||||
isc_boolean_t result = ISC_FALSE;
|
||||
@ -1250,7 +1253,7 @@ dec_entry_refcnt(dns_adb_t *adb, dns_adbentry_t *entry, isc_boolean_t lock) {
|
||||
|
||||
destroy_entry = ISC_FALSE;
|
||||
if (entry->refcnt == 0 &&
|
||||
(adb->entry_sd[bucket] || entry->expires == 0 || adb->overmem ||
|
||||
(adb->entry_sd[bucket] || entry->expires == 0 || overmem ||
|
||||
(entry->flags & ENTRY_IS_DEAD) != 0)) {
|
||||
destroy_entry = ISC_TRUE;
|
||||
result = unlink_entry(adb, entry);
|
||||
@ -1852,7 +1855,7 @@ check_stale_name(dns_adb_t *adb, int bucket, isc_stdtime_t now) {
|
||||
int victims, max_victims;
|
||||
isc_boolean_t result;
|
||||
dns_adbname_t *victim, *next_victim;
|
||||
isc_boolean_t overmem = adb->overmem;
|
||||
isc_boolean_t overmem = isc_mem_isovermem(adb->mctx);
|
||||
int scans = 0;
|
||||
|
||||
INSIST(bucket != DNS_ADB_INVALIDBUCKET);
|
||||
@ -2049,7 +2052,6 @@ dns_adb_create(isc_mem_t *mem, dns_view_t *view, isc_timermgr_t *timermgr,
|
||||
adb, NULL, NULL);
|
||||
adb->cevent_sent = ISC_FALSE;
|
||||
adb->shutting_down = ISC_FALSE;
|
||||
adb->overmem = ISC_FALSE;
|
||||
ISC_LIST_INIT(adb->whenshutdown);
|
||||
|
||||
isc_mem_attach(mem, &adb->mctx);
|
||||
@ -2616,6 +2618,7 @@ dns_adb_destroyfind(dns_adbfind_t **findp) {
|
||||
dns_adbaddrinfo_t *ai;
|
||||
int bucket;
|
||||
dns_adb_t *adb;
|
||||
isc_boolean_t overmem;
|
||||
|
||||
REQUIRE(findp != NULL && DNS_ADBFIND_VALID(*findp));
|
||||
find = *findp;
|
||||
@ -2640,13 +2643,14 @@ dns_adb_destroyfind(dns_adbfind_t **findp) {
|
||||
* Return the find to the memory pool, and decrement the adb's
|
||||
* reference count.
|
||||
*/
|
||||
overmem = isc_mem_isovermem(adb->mctx);
|
||||
ai = ISC_LIST_HEAD(find->list);
|
||||
while (ai != NULL) {
|
||||
ISC_LIST_UNLINK(find->list, ai, publink);
|
||||
entry = ai->entry;
|
||||
ai->entry = NULL;
|
||||
INSIST(DNS_ADBENTRY_VALID(entry));
|
||||
RUNTIME_CHECK(dec_entry_refcnt(adb, entry, ISC_TRUE) ==
|
||||
RUNTIME_CHECK(dec_entry_refcnt(adb, overmem, entry, ISC_TRUE) ==
|
||||
ISC_FALSE);
|
||||
free_adbaddrinfo(adb, &ai);
|
||||
ai = ISC_LIST_HEAD(find->list);
|
||||
@ -3509,6 +3513,7 @@ dns_adb_freeaddrinfo(dns_adb_t *adb, dns_adbaddrinfo_t **addrp) {
|
||||
int bucket;
|
||||
isc_stdtime_t now;
|
||||
isc_boolean_t want_check_exit = ISC_FALSE;
|
||||
isc_boolean_t overmem;
|
||||
|
||||
REQUIRE(DNS_ADB_VALID(adb));
|
||||
REQUIRE(addrp != NULL);
|
||||
@ -3520,13 +3525,14 @@ dns_adb_freeaddrinfo(dns_adb_t *adb, dns_adbaddrinfo_t **addrp) {
|
||||
isc_stdtime_get(&now);
|
||||
|
||||
*addrp = NULL;
|
||||
overmem = isc_mem_isovermem(adb->mctx);
|
||||
|
||||
bucket = addr->entry->lock_bucket;
|
||||
LOCK(&adb->entrylocks[bucket]);
|
||||
|
||||
entry->expires = now + ADB_ENTRY_WINDOW;
|
||||
|
||||
want_check_exit = dec_entry_refcnt(adb, entry, ISC_FALSE);
|
||||
want_check_exit = dec_entry_refcnt(adb, overmem, entry, ISC_FALSE);
|
||||
|
||||
UNLOCK(&adb->entrylocks[bucket]);
|
||||
|
||||
@ -3591,6 +3597,14 @@ dns_adb_flushname(dns_adb_t *adb, dns_name_t *name) {
|
||||
|
||||
static void
|
||||
water(void *arg, int mark) {
|
||||
/*
|
||||
* We're going to change the way to handle overmem condition: use
|
||||
* isc_mem_isovermem() instead of storing the state via this callback,
|
||||
* since the latter way tends to cause race conditions.
|
||||
* To minimize the change, and in case we re-enable the callback
|
||||
* approach, however, keep this function at the moment.
|
||||
*/
|
||||
|
||||
dns_adb_t *adb = arg;
|
||||
isc_boolean_t overmem = ISC_TF(mark == ISC_MEM_HIWATER);
|
||||
|
||||
@ -3598,17 +3612,6 @@ water(void *arg, int mark) {
|
||||
|
||||
DP(ISC_LOG_DEBUG(1),
|
||||
"adb reached %s water mark", overmem ? "high" : "low");
|
||||
|
||||
/*
|
||||
* We can't use adb->lock as there is potential for water
|
||||
* to be called when adb->lock is held.
|
||||
*/
|
||||
LOCK(&adb->overmemlock);
|
||||
if (adb->overmem != overmem) {
|
||||
adb->overmem = overmem;
|
||||
isc_mem_waterack(adb->mctx, mark);
|
||||
}
|
||||
UNLOCK(&adb->overmemlock);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1,3 +1,3 @@
|
||||
LIBINTERFACE = 56
|
||||
LIBREVISION = 1
|
||||
LIBAGE = 1
|
||||
LIBINTERFACE = 57
|
||||
LIBREVISION = 0
|
||||
LIBAGE = 2
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2000, 2001 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: diff.h,v 1.15.120.2 2009/01/18 23:47:41 tbox Exp $ */
|
||||
/* $Id: diff.h,v 1.15.120.2.24.2 2010/06/04 23:49:23 tbox Exp $ */
|
||||
|
||||
#ifndef DNS_DIFF_H
|
||||
#define DNS_DIFF_H 1
|
||||
@ -70,7 +70,7 @@ typedef enum {
|
||||
DNS_DIFFOP_DEL = 1, /*%< Delete an RR. */
|
||||
DNS_DIFFOP_EXISTS = 2, /*%< Assert RR existence. */
|
||||
DNS_DIFFOP_ADDRESIGN = 4, /*%< ADD + RESIGN. */
|
||||
DNS_DIFFOP_DELRESIGN = 5, /*%< DEL + RESIGN. */
|
||||
DNS_DIFFOP_DELRESIGN = 5 /*%< DEL + RESIGN. */
|
||||
} dns_diffop_t;
|
||||
|
||||
typedef struct dns_difftuple dns_difftuple_t;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1999-2002 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: ncache.h,v 1.25.48.2 2009/12/30 23:47:31 tbox Exp $ */
|
||||
/* $Id: ncache.h,v 1.25.48.2.10.2 2010/05/14 23:48:44 tbox Exp $ */
|
||||
|
||||
#ifndef DNS_NCACHE_H
|
||||
#define DNS_NCACHE_H 1
|
||||
@ -161,6 +161,13 @@ dns_ncache_getrdataset(dns_rdataset_t *ncacherdataset, dns_name_t *name,
|
||||
*
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
dns_ncache_getsigrdataset(dns_rdataset_t *ncacherdataset, dns_name_t *name,
|
||||
dns_rdatatype_t covers, dns_rdataset_t *rdataset);
|
||||
/*%<
|
||||
* Similar to dns_ncache_getrdataset() but get the rrsig that matches.
|
||||
*/
|
||||
|
||||
void
|
||||
dns_ncache_current(dns_rdataset_t *ncacherdataset, dns_name_t *found,
|
||||
dns_rdataset_t *rdataset);
|
||||
|
@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: rdataset.h,v 1.65.50.2.22.2 2010/02/25 10:57:12 tbox Exp $ */
|
||||
/* $Id: rdataset.h,v 1.65.50.2.24.1 2010/03/03 22:06:39 marka Exp $ */
|
||||
|
||||
#ifndef DNS_RDATASET_H
|
||||
#define DNS_RDATASET_H 1
|
||||
|
@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: resolver.h,v 1.60.56.3.22.2 2010/02/25 10:57:12 tbox Exp $ */
|
||||
/* $Id: resolver.h,v 1.60.56.3.24.1 2010/03/03 22:06:39 marka Exp $ */
|
||||
|
||||
#ifndef DNS_RESOLVER_H
|
||||
#define DNS_RESOLVER_H 1
|
||||
|
@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: result.h,v 1.116.226.2 2010/02/25 10:57:12 tbox Exp $ */
|
||||
/* $Id: result.h,v 1.116.228.1 2010/03/03 22:06:39 marka Exp $ */
|
||||
|
||||
#ifndef DNS_RESULT_H
|
||||
#define DNS_RESULT_H 1
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1998-2003 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: types.h,v 1.130.50.5 2009/12/30 08:34:30 jinmei Exp $ */
|
||||
/* $Id: types.h,v 1.130.50.5.10.2 2010/05/14 23:48:44 tbox Exp $ */
|
||||
|
||||
#ifndef DNS_TYPES_H
|
||||
#define DNS_TYPES_H 1
|
||||
@ -304,6 +304,7 @@ enum {
|
||||
#define DNS_TRUST_ADDITIONAL(x) ((x) == dns_trust_additional || \
|
||||
(x) == dns_trust_pending_additional)
|
||||
#define DNS_TRUST_GLUE(x) ((x) == dns_trust_glue)
|
||||
#define DNS_TRUST_ANSWER(x) ((x) == dns_trust_answer)
|
||||
|
||||
|
||||
/*%
|
||||
|
@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: validator.h,v 1.41.48.3.22.2 2010/02/25 10:57:12 tbox Exp $ */
|
||||
/* $Id: validator.h,v 1.41.48.3.24.1 2010/03/03 22:06:39 marka Exp $ */
|
||||
|
||||
#ifndef DNS_VALIDATOR_H
|
||||
#define DNS_VALIDATOR_H 1
|
||||
|
@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: ncache.c,v 1.43.334.2 2010/02/25 10:57:11 tbox Exp $ */
|
||||
/* $Id: ncache.c,v 1.43.336.5 2010/05/19 09:56:44 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
@ -40,6 +40,7 @@
|
||||
*
|
||||
* owner name
|
||||
* type
|
||||
* trust
|
||||
* rdata count
|
||||
* rdata length These two occur 'rdata count'
|
||||
* rdata times.
|
||||
@ -189,6 +190,8 @@ dns_ncache_addoptout(dns_message_t *message, dns_db_t *cache,
|
||||
return (ISC_R_NOSPACE);
|
||||
isc_buffer_putuint16(&buffer,
|
||||
rdataset->type);
|
||||
isc_buffer_putuint8(&buffer,
|
||||
(unsigned char)rdataset->trust);
|
||||
/*
|
||||
* Copy the rdataset into the buffer.
|
||||
*/
|
||||
@ -245,10 +248,9 @@ dns_ncache_addoptout(dns_message_t *message, dns_db_t *cache,
|
||||
* Copy the type and a zero rdata count to the buffer.
|
||||
*/
|
||||
isc_buffer_availableregion(&buffer, &r);
|
||||
if (r.length < 4)
|
||||
if (r.length < 5)
|
||||
return (ISC_R_NOSPACE);
|
||||
isc_buffer_putuint16(&buffer, 0);
|
||||
isc_buffer_putuint16(&buffer, 0);
|
||||
isc_buffer_putuint16(&buffer, 0); /* type */
|
||||
/*
|
||||
* RFC2308, section 5, says that negative answers without
|
||||
* SOAs should not be cached.
|
||||
@ -266,6 +268,9 @@ dns_ncache_addoptout(dns_message_t *message, dns_db_t *cache,
|
||||
trust = dns_trust_authauthority;
|
||||
} else
|
||||
trust = dns_trust_additional;
|
||||
isc_buffer_putuint8(&buffer, (unsigned char)trust); /* trust */
|
||||
isc_buffer_putuint16(&buffer, 0); /* count */
|
||||
|
||||
/*
|
||||
* Now add it to the cache.
|
||||
*/
|
||||
@ -335,8 +340,9 @@ dns_ncache_towire(dns_rdataset_t *rdataset, dns_compress_t *cctx,
|
||||
isc_buffer_forward(&source, name.length);
|
||||
remaining.length -= name.length;
|
||||
|
||||
INSIST(remaining.length >= 4);
|
||||
INSIST(remaining.length >= 5);
|
||||
type = isc_buffer_getuint16(&source);
|
||||
isc_buffer_forward(&source, 1);
|
||||
rcount = isc_buffer_getuint16(&source);
|
||||
|
||||
for (i = 0; i < rcount; i++) {
|
||||
@ -506,6 +512,13 @@ rdataset_count(dns_rdataset_t *rdataset) {
|
||||
return (count);
|
||||
}
|
||||
|
||||
static void
|
||||
rdataset_settrust(dns_rdataset_t *rdataset, dns_trust_t trust) {
|
||||
unsigned char *raw = rdataset->private3;
|
||||
|
||||
raw[-1] = (unsigned char)trust;
|
||||
}
|
||||
|
||||
static dns_rdatasetmethods_t rdataset_methods = {
|
||||
rdataset_disassociate,
|
||||
rdataset_first,
|
||||
@ -520,7 +533,7 @@ static dns_rdatasetmethods_t rdataset_methods = {
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
rdataset_settrust,
|
||||
NULL
|
||||
};
|
||||
|
||||
@ -534,6 +547,8 @@ dns_ncache_getrdataset(dns_rdataset_t *ncacherdataset, dns_name_t *name,
|
||||
isc_buffer_t source;
|
||||
dns_name_t tname;
|
||||
dns_rdatatype_t ttype;
|
||||
dns_trust_t trust = dns_trust_none;
|
||||
dns_rdataset_t clone;
|
||||
|
||||
REQUIRE(ncacherdataset != NULL);
|
||||
REQUIRE(ncacherdataset->type == 0);
|
||||
@ -541,9 +556,11 @@ dns_ncache_getrdataset(dns_rdataset_t *ncacherdataset, dns_name_t *name,
|
||||
REQUIRE(!dns_rdataset_isassociated(rdataset));
|
||||
REQUIRE(type != dns_rdatatype_rrsig);
|
||||
|
||||
result = dns_rdataset_first(ncacherdataset);
|
||||
dns_rdataset_init(&clone);
|
||||
dns_rdataset_clone(ncacherdataset, &clone);
|
||||
result = dns_rdataset_first(&clone);
|
||||
while (result == ISC_R_SUCCESS) {
|
||||
dns_rdataset_current(ncacherdataset, &rdata);
|
||||
dns_rdataset_current(&clone, &rdata);
|
||||
isc_buffer_init(&source, rdata.data, rdata.length);
|
||||
isc_buffer_add(&source, rdata.length);
|
||||
dns_name_init(&tname, NULL);
|
||||
@ -553,16 +570,19 @@ dns_ncache_getrdataset(dns_rdataset_t *ncacherdataset, dns_name_t *name,
|
||||
isc_buffer_forward(&source, tname.length);
|
||||
remaining.length -= tname.length;
|
||||
|
||||
INSIST(remaining.length >= 4);
|
||||
INSIST(remaining.length >= 3);
|
||||
ttype = isc_buffer_getuint16(&source);
|
||||
|
||||
if (ttype == type && dns_name_equal(&tname, name)) {
|
||||
trust = isc_buffer_getuint8(&source);
|
||||
INSIST(trust <= dns_trust_ultimate);
|
||||
isc_buffer_remainingregion(&source, &remaining);
|
||||
break;
|
||||
}
|
||||
result = dns_rdataset_next(ncacherdataset);
|
||||
result = dns_rdataset_next(&clone);
|
||||
dns_rdata_reset(&rdata);
|
||||
}
|
||||
dns_rdataset_disassociate(&clone);
|
||||
if (result == ISC_R_NOMORE)
|
||||
return (ISC_R_NOTFOUND);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
@ -575,7 +595,108 @@ dns_ncache_getrdataset(dns_rdataset_t *ncacherdataset, dns_name_t *name,
|
||||
rdataset->type = type;
|
||||
rdataset->covers = 0;
|
||||
rdataset->ttl = ncacherdataset->ttl;
|
||||
rdataset->trust = ncacherdataset->trust;
|
||||
rdataset->trust = trust;
|
||||
rdataset->private1 = NULL;
|
||||
rdataset->private2 = NULL;
|
||||
|
||||
rdataset->private3 = remaining.base;
|
||||
|
||||
/*
|
||||
* Reset iterator state.
|
||||
*/
|
||||
rdataset->privateuint4 = 0;
|
||||
rdataset->private5 = NULL;
|
||||
rdataset->private6 = NULL;
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
dns_ncache_getsigrdataset(dns_rdataset_t *ncacherdataset, dns_name_t *name,
|
||||
dns_rdatatype_t covers, dns_rdataset_t *rdataset)
|
||||
{
|
||||
dns_name_t tname;
|
||||
dns_rdata_rrsig_t rrsig;
|
||||
dns_rdata_t rdata = DNS_RDATA_INIT;
|
||||
dns_rdataset_t clone;
|
||||
dns_rdatatype_t type;
|
||||
dns_trust_t trust = dns_trust_none;
|
||||
isc_buffer_t source;
|
||||
isc_region_t remaining, sigregion;
|
||||
isc_result_t result;
|
||||
unsigned char *raw;
|
||||
unsigned int count;
|
||||
|
||||
REQUIRE(ncacherdataset != NULL);
|
||||
REQUIRE(ncacherdataset->type == 0);
|
||||
REQUIRE(name != NULL);
|
||||
REQUIRE(!dns_rdataset_isassociated(rdataset));
|
||||
|
||||
dns_rdataset_init(&clone);
|
||||
dns_rdataset_clone(ncacherdataset, &clone);
|
||||
result = dns_rdataset_first(&clone);
|
||||
while (result == ISC_R_SUCCESS) {
|
||||
dns_rdataset_current(&clone, &rdata);
|
||||
isc_buffer_init(&source, rdata.data, rdata.length);
|
||||
isc_buffer_add(&source, rdata.length);
|
||||
dns_name_init(&tname, NULL);
|
||||
isc_buffer_remainingregion(&source, &remaining);
|
||||
dns_name_fromregion(&tname, &remaining);
|
||||
INSIST(remaining.length >= tname.length);
|
||||
isc_buffer_forward(&source, tname.length);
|
||||
remaining.length -= tname.length;
|
||||
remaining.base += tname.length;
|
||||
|
||||
INSIST(remaining.length >= 2);
|
||||
type = isc_buffer_getuint16(&source);
|
||||
remaining.length -= 2;
|
||||
remaining.base += 2;
|
||||
|
||||
if (type != dns_rdatatype_rrsig ||
|
||||
!dns_name_equal(&tname, name)) {
|
||||
result = dns_rdataset_next(&clone);
|
||||
dns_rdata_reset(&rdata);
|
||||
continue;
|
||||
}
|
||||
|
||||
INSIST(remaining.length >= 1);
|
||||
trust = isc_buffer_getuint8(&source);
|
||||
INSIST(trust <= dns_trust_ultimate);
|
||||
remaining.length -= 1;
|
||||
remaining.base += 1;
|
||||
|
||||
raw = remaining.base;
|
||||
count = raw[0] * 256 + raw[1];
|
||||
INSIST(count > 0);
|
||||
raw += 2;
|
||||
sigregion.length = raw[0] * 256 + raw[1];
|
||||
raw += 2;
|
||||
sigregion.base = raw;
|
||||
dns_rdata_reset(&rdata);
|
||||
dns_rdata_fromregion(&rdata, rdataset->rdclass,
|
||||
dns_rdatatype_rrsig, &sigregion);
|
||||
(void)dns_rdata_tostruct(&rdata, &rrsig, NULL);
|
||||
if (rrsig.covered == covers) {
|
||||
isc_buffer_remainingregion(&source, &remaining);
|
||||
break;
|
||||
}
|
||||
|
||||
result = dns_rdataset_next(&clone);
|
||||
dns_rdata_reset(&rdata);
|
||||
}
|
||||
dns_rdataset_disassociate(&clone);
|
||||
if (result == ISC_R_NOMORE)
|
||||
return (ISC_R_NOTFOUND);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
INSIST(remaining.length != 0);
|
||||
|
||||
rdataset->methods = &rdataset_methods;
|
||||
rdataset->rdclass = ncacherdataset->rdclass;
|
||||
rdataset->type = dns_rdatatype_rrsig;
|
||||
rdataset->covers = covers;
|
||||
rdataset->ttl = ncacherdataset->ttl;
|
||||
rdataset->trust = trust;
|
||||
rdataset->private1 = NULL;
|
||||
rdataset->private2 = NULL;
|
||||
|
||||
@ -595,6 +716,7 @@ dns_ncache_current(dns_rdataset_t *ncacherdataset, dns_name_t *found,
|
||||
dns_rdataset_t *rdataset)
|
||||
{
|
||||
dns_rdata_t rdata = DNS_RDATA_INIT;
|
||||
dns_trust_t trust;
|
||||
isc_region_t remaining, sigregion;
|
||||
isc_buffer_t source;
|
||||
dns_name_t tname;
|
||||
@ -619,8 +741,10 @@ dns_ncache_current(dns_rdataset_t *ncacherdataset, dns_name_t *found,
|
||||
isc_buffer_forward(&source, found->length);
|
||||
remaining.length -= found->length;
|
||||
|
||||
INSIST(remaining.length >= 4);
|
||||
INSIST(remaining.length >= 5);
|
||||
type = isc_buffer_getuint16(&source);
|
||||
trust = isc_buffer_getuint8(&source);
|
||||
INSIST(trust <= dns_trust_ultimate);
|
||||
isc_buffer_remainingregion(&source, &remaining);
|
||||
|
||||
rdataset->methods = &rdataset_methods;
|
||||
@ -645,7 +769,7 @@ dns_ncache_current(dns_rdataset_t *ncacherdataset, dns_name_t *found,
|
||||
} else
|
||||
rdataset->covers = 0;
|
||||
rdataset->ttl = ncacherdataset->ttl;
|
||||
rdataset->trust = ncacherdataset->trust;
|
||||
rdataset->trust = trust;
|
||||
rdataset->private1 = NULL;
|
||||
rdataset->private2 = NULL;
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: rbtdb.c,v 1.270.12.16.8.3 2010/02/26 00:24:39 marka Exp $ */
|
||||
/* $Id: rbtdb.c,v 1.270.12.16.10.3 2010/08/13 07:25:21 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
@ -411,7 +411,6 @@ typedef struct {
|
||||
rbtdb_version_t * current_version;
|
||||
rbtdb_version_t * future_version;
|
||||
rbtdb_versionlist_t open_versions;
|
||||
isc_boolean_t overmem;
|
||||
isc_task_t * task;
|
||||
dns_dbnode_t *soanode;
|
||||
dns_dbnode_t *nsnode;
|
||||
@ -3209,6 +3208,9 @@ matchparams(rdatasetheader_t *header, rbtdb_search_t *search)
|
||||
return (ISC_FALSE);
|
||||
}
|
||||
|
||||
/*
|
||||
* Find node of the NSEC/NSEC3 record that is 'name'.
|
||||
*/
|
||||
static inline isc_result_t
|
||||
find_closest_nsec(rbtdb_search_t *search, dns_dbnode_t **nodep,
|
||||
dns_name_t *foundname, dns_rdataset_t *rdataset,
|
||||
@ -4928,7 +4930,7 @@ expirenode(dns_db_t *db, dns_dbnode_t *node, isc_stdtime_t now) {
|
||||
if (now == 0)
|
||||
isc_stdtime_get(&now);
|
||||
|
||||
if (rbtdb->overmem) {
|
||||
if (isc_mem_isovermem(rbtdb->common.mctx)) {
|
||||
isc_uint32_t val;
|
||||
|
||||
isc_random_get(&val);
|
||||
@ -4938,8 +4940,8 @@ expirenode(dns_db_t *db, dns_dbnode_t *node, isc_stdtime_t now) {
|
||||
force_expire = ISC_TF(rbtnode->down == NULL && val % 4 == 0);
|
||||
|
||||
/*
|
||||
* Note that 'log' can be true IFF rbtdb->overmem is also true.
|
||||
* rbtdb->overmem can currently only be true for cache
|
||||
* Note that 'log' can be true IFF overmem is also true.
|
||||
* overmem can currently only be true for cache
|
||||
* databases -- hence all of the "overmem cache" log strings.
|
||||
*/
|
||||
log = ISC_TF(isc_log_wouldlog(dns_lctx, level));
|
||||
@ -4984,7 +4986,7 @@ expirenode(dns_db_t *db, dns_dbnode_t *node, isc_stdtime_t now) {
|
||||
"reprieve by RETAIN() %s",
|
||||
printname);
|
||||
}
|
||||
} else if (rbtdb->overmem && log)
|
||||
} else if (isc_mem_isovermem(rbtdb->common.mctx) && log)
|
||||
isc_log_write(dns_lctx, category, module, level,
|
||||
"overmem cache: saved %s", printname);
|
||||
|
||||
@ -4996,10 +4998,12 @@ expirenode(dns_db_t *db, dns_dbnode_t *node, isc_stdtime_t now) {
|
||||
|
||||
static void
|
||||
overmem(dns_db_t *db, isc_boolean_t overmem) {
|
||||
dns_rbtdb_t *rbtdb = (dns_rbtdb_t *)db;
|
||||
/* This is an empty callback. See adb.c:water() */
|
||||
|
||||
if (IS_CACHE(rbtdb))
|
||||
rbtdb->overmem = overmem;
|
||||
UNUSED(db);
|
||||
UNUSED(overmem);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -5943,6 +5947,7 @@ addrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
|
||||
isc_result_t result;
|
||||
isc_boolean_t delegating;
|
||||
isc_boolean_t tree_locked = ISC_FALSE;
|
||||
isc_boolean_t cache_is_overmem = ISC_FALSE;
|
||||
|
||||
REQUIRE(VALID_RBTDB(rbtdb));
|
||||
|
||||
@ -6030,12 +6035,14 @@ addrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
|
||||
* the lock does not necessarily have to be acquired but it will help
|
||||
* purge stale entries more effectively.
|
||||
*/
|
||||
if (delegating || (IS_CACHE(rbtdb) && rbtdb->overmem)) {
|
||||
if (IS_CACHE(rbtdb) && isc_mem_isovermem(rbtdb->common.mctx))
|
||||
cache_is_overmem = ISC_TRUE;
|
||||
if (delegating || cache_is_overmem) {
|
||||
tree_locked = ISC_TRUE;
|
||||
RWLOCK(&rbtdb->tree_lock, isc_rwlocktype_write);
|
||||
}
|
||||
|
||||
if (IS_CACHE(rbtdb) && rbtdb->overmem)
|
||||
if (cache_is_overmem)
|
||||
overmem_purge(rbtdb, rbtnode->locknum, now, tree_locked);
|
||||
|
||||
NODE_LOCK(&rbtdb->node_locks[rbtnode->locknum].lock,
|
||||
@ -7098,7 +7105,6 @@ dns_rbtdb_create
|
||||
return (result);
|
||||
}
|
||||
rbtdb->attributes = 0;
|
||||
rbtdb->overmem = ISC_FALSE;
|
||||
rbtdb->task = NULL;
|
||||
|
||||
/*
|
||||
|
@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: rdatalist.c,v 1.36.336.2 2010/02/25 10:57:12 tbox Exp $ */
|
||||
/* $Id: rdatalist.c,v 1.36.338.1 2010/03/03 22:06:39 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: rdataset.c,v 1.82.50.2.22.2 2010/02/25 10:57:12 tbox Exp $ */
|
||||
/* $Id: rdataset.c,v 1.82.50.2.24.1 2010/03/03 22:06:39 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: rdataslab.c,v 1.48.50.2.22.2 2010/02/25 10:57:12 tbox Exp $ */
|
||||
/* $Id: rdataslab.c,v 1.48.50.2.24.1 2010/03/03 22:06:39 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: resolver.c,v 1.384.14.20.8.2 2010/02/25 10:57:12 tbox Exp $ */
|
||||
/* $Id: resolver.c,v 1.384.14.20.10.3 2010/06/23 23:46:25 tbox Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
@ -5815,13 +5815,40 @@ answer_response(fetchctx_t *fctx) {
|
||||
return (result);
|
||||
}
|
||||
|
||||
static isc_boolean_t
|
||||
fctx_decreference(fetchctx_t *fctx) {
|
||||
isc_boolean_t bucket_empty = ISC_FALSE;
|
||||
|
||||
INSIST(fctx->references > 0);
|
||||
fctx->references--;
|
||||
if (fctx->references == 0) {
|
||||
/*
|
||||
* No one cares about the result of this fetch anymore.
|
||||
*/
|
||||
if (fctx->pending == 0 && fctx->nqueries == 0 &&
|
||||
ISC_LIST_EMPTY(fctx->validators) && SHUTTINGDOWN(fctx)) {
|
||||
/*
|
||||
* This fctx is already shutdown; we were just
|
||||
* waiting for the last reference to go away.
|
||||
*/
|
||||
bucket_empty = fctx_destroy(fctx);
|
||||
} else {
|
||||
/*
|
||||
* Initiate shutdown.
|
||||
*/
|
||||
fctx_shutdown(fctx);
|
||||
}
|
||||
}
|
||||
return (bucket_empty);
|
||||
}
|
||||
|
||||
static void
|
||||
resume_dslookup(isc_task_t *task, isc_event_t *event) {
|
||||
dns_fetchevent_t *fevent;
|
||||
dns_resolver_t *res;
|
||||
fetchctx_t *fctx;
|
||||
isc_result_t result;
|
||||
isc_boolean_t bucket_empty = ISC_FALSE;
|
||||
isc_boolean_t bucket_empty;
|
||||
isc_boolean_t locked = ISC_FALSE;
|
||||
unsigned int bucketnum;
|
||||
dns_rdataset_t nameservers;
|
||||
@ -5925,9 +5952,7 @@ resume_dslookup(isc_task_t *task, isc_event_t *event) {
|
||||
isc_event_free(&event);
|
||||
if (!locked)
|
||||
LOCK(&res->buckets[bucketnum].lock);
|
||||
fctx->references--;
|
||||
if (fctx->references == 0)
|
||||
bucket_empty = fctx_destroy(fctx);
|
||||
bucket_empty = fctx_decreference(fctx);
|
||||
UNLOCK(&res->buckets[bucketnum].lock);
|
||||
if (bucket_empty)
|
||||
empty_bucket(res);
|
||||
@ -6752,12 +6777,14 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
|
||||
&fctx->nsfetch);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fctx_done(fctx, result, __LINE__);
|
||||
LOCK(&fctx->res->buckets[fctx->bucketnum].lock);
|
||||
fctx->references++;
|
||||
UNLOCK(&fctx->res->buckets[fctx->bucketnum].lock);
|
||||
result = fctx_stopidletimer(fctx);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fctx_done(fctx, result, __LINE__);
|
||||
else {
|
||||
LOCK(&fctx->res->buckets[fctx->bucketnum].lock);
|
||||
fctx->references++;
|
||||
UNLOCK(&fctx->res->buckets[fctx->bucketnum].lock);
|
||||
result = fctx_stopidletimer(fctx);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fctx_done(fctx, result, __LINE__);
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
* We're done.
|
||||
@ -7602,7 +7629,7 @@ dns_resolver_destroyfetch(dns_fetch_t **fetchp) {
|
||||
dns_fetchevent_t *event, *next_event;
|
||||
fetchctx_t *fctx;
|
||||
unsigned int bucketnum;
|
||||
isc_boolean_t bucket_empty = ISC_FALSE;
|
||||
isc_boolean_t bucket_empty;
|
||||
|
||||
REQUIRE(fetchp != NULL);
|
||||
fetch = *fetchp;
|
||||
@ -7630,27 +7657,7 @@ dns_resolver_destroyfetch(dns_fetch_t **fetchp) {
|
||||
}
|
||||
}
|
||||
|
||||
INSIST(fctx->references > 0);
|
||||
fctx->references--;
|
||||
if (fctx->references == 0) {
|
||||
/*
|
||||
* No one cares about the result of this fetch anymore.
|
||||
*/
|
||||
if (fctx->pending == 0 && fctx->nqueries == 0 &&
|
||||
ISC_LIST_EMPTY(fctx->validators) &&
|
||||
SHUTTINGDOWN(fctx)) {
|
||||
/*
|
||||
* This fctx is already shutdown; we were just
|
||||
* waiting for the last reference to go away.
|
||||
*/
|
||||
bucket_empty = fctx_destroy(fctx);
|
||||
} else {
|
||||
/*
|
||||
* Initiate shutdown.
|
||||
*/
|
||||
fctx_shutdown(fctx);
|
||||
}
|
||||
}
|
||||
bucket_empty = fctx_decreference(fctx);
|
||||
|
||||
UNLOCK(&res->buckets[bucketnum].lock);
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: result.c,v 1.125.122.2 2010/02/25 10:57:12 tbox Exp $ */
|
||||
/* $Id: result.c,v 1.125.124.1 2010/03/03 22:06:39 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: sdb.c,v 1.66.48.3.8.2 2010/02/25 10:57:12 tbox Exp $ */
|
||||
/* $Id: sdb.c,v 1.66.48.3.10.1 2010/03/03 22:06:39 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
|
@ -50,7 +50,7 @@
|
||||
* USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: sdlz.c,v 1.18.50.3.8.2 2010/02/25 10:57:12 tbox Exp $ */
|
||||
/* $Id: sdlz.c,v 1.18.50.3.10.1 2010/03/03 22:06:39 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: view.c,v 1.150.84.3.8.2 2010/02/25 10:57:12 tbox Exp $ */
|
||||
/* $Id: view.c,v 1.150.84.3.10.1 2010/03/03 22:06:39 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
LIBINTERFACE = 52
|
||||
LIBREVISION = 1
|
||||
LIBAGE = 2
|
||||
LIBINTERFACE = 53
|
||||
LIBREVISION = 0
|
||||
LIBAGE = 3
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1997-2001 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: mem.h,v 1.78.120.3 2009/02/11 03:07:01 jinmei Exp $ */
|
||||
/* $Id: mem.h,v 1.78.120.3.24.2 2010/08/12 23:46:25 tbox Exp $ */
|
||||
|
||||
#ifndef ISC_MEM_H
|
||||
#define ISC_MEM_H 1
|
||||
@ -334,6 +334,14 @@ isc_mem_inuse(isc_mem_t *mctx);
|
||||
* allocated from the system but not yet used.
|
||||
*/
|
||||
|
||||
isc_boolean_t
|
||||
isc_mem_isovermem(isc_mem_t *mctx);
|
||||
/*%<
|
||||
* Return true iff the memory context is in "over memory" state, i.e.,
|
||||
* a hiwater mark has been set and the used amount of memory has exceeds
|
||||
* the mark.
|
||||
*/
|
||||
|
||||
void
|
||||
isc_mem_setwater(isc_mem_t *mctx, isc_mem_water_t water, void *water_arg,
|
||||
size_t hiwater, size_t lowater);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1997-2003 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: mem.c,v 1.145.120.4 2009/02/16 03:17:05 marka Exp $ */
|
||||
/* $Id: mem.c,v 1.145.120.4.24.2 2010/08/12 23:46:25 tbox Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
@ -141,6 +141,7 @@ struct isc_mem {
|
||||
size_t hi_water;
|
||||
size_t lo_water;
|
||||
isc_boolean_t hi_called;
|
||||
isc_boolean_t is_overmem;
|
||||
isc_mem_water_t water;
|
||||
void * water_arg;
|
||||
ISC_LIST(isc_mempool_t) pools;
|
||||
@ -764,6 +765,7 @@ isc_mem_createx2(size_t init_max_size, size_t target_size,
|
||||
ctx->hi_water = 0;
|
||||
ctx->lo_water = 0;
|
||||
ctx->hi_called = ISC_FALSE;
|
||||
ctx->is_overmem = ISC_FALSE;
|
||||
ctx->water = NULL;
|
||||
ctx->water_arg = NULL;
|
||||
ctx->magic = MEM_MAGIC;
|
||||
@ -1102,6 +1104,10 @@ isc__mem_get(isc_mem_t *ctx, size_t size FLARG) {
|
||||
}
|
||||
|
||||
ADD_TRACE(ctx, ptr, size, file, line);
|
||||
if (ctx->hi_water != 0U && ctx->inuse > ctx->hi_water &&
|
||||
!ctx->is_overmem) {
|
||||
ctx->is_overmem = ISC_TRUE;
|
||||
}
|
||||
if (ctx->hi_water != 0U && !ctx->hi_called &&
|
||||
ctx->inuse > ctx->hi_water) {
|
||||
call_water = ISC_TRUE;
|
||||
@ -1159,6 +1165,10 @@ isc__mem_put(isc_mem_t *ctx, void *ptr, size_t size FLARG)
|
||||
* when the context was pushed over hi_water but then had
|
||||
* isc_mem_setwater() called with 0 for hi_water and lo_water.
|
||||
*/
|
||||
if (ctx->is_overmem &&
|
||||
(ctx->inuse < ctx->lo_water || ctx->lo_water == 0U)) {
|
||||
ctx->is_overmem = ISC_FALSE;
|
||||
}
|
||||
if (ctx->hi_called &&
|
||||
(ctx->inuse < ctx->lo_water || ctx->lo_water == 0U)) {
|
||||
if (ctx->water != NULL)
|
||||
@ -1345,6 +1355,11 @@ isc__mem_allocate(isc_mem_t *ctx, size_t size FLARG) {
|
||||
#if ISC_MEM_TRACKLINES
|
||||
ADD_TRACE(ctx, si, si[-1].u.size, file, line);
|
||||
#endif
|
||||
if (ctx->hi_water != 0U && ctx->inuse > ctx->hi_water &&
|
||||
!ctx->is_overmem) {
|
||||
ctx->is_overmem = ISC_TRUE;
|
||||
}
|
||||
|
||||
if (ctx->hi_water != 0U && !ctx->hi_called &&
|
||||
ctx->inuse > ctx->hi_water) {
|
||||
ctx->hi_called = ISC_TRUE;
|
||||
@ -1433,6 +1448,11 @@ isc__mem_free(isc_mem_t *ctx, void *ptr FLARG) {
|
||||
* when the context was pushed over hi_water but then had
|
||||
* isc_mem_setwater() called with 0 for hi_water and lo_water.
|
||||
*/
|
||||
if (ctx->is_overmem &&
|
||||
(ctx->inuse < ctx->lo_water || ctx->lo_water == 0U)) {
|
||||
ctx->is_overmem = ISC_FALSE;
|
||||
}
|
||||
|
||||
if (ctx->hi_called &&
|
||||
(ctx->inuse < ctx->lo_water || ctx->lo_water == 0U)) {
|
||||
ctx->hi_called = ISC_FALSE;
|
||||
@ -1559,6 +1579,18 @@ isc_mem_setwater(isc_mem_t *ctx, isc_mem_water_t water, void *water_arg,
|
||||
(oldwater)(oldwater_arg, ISC_MEM_LOWATER);
|
||||
}
|
||||
|
||||
isc_boolean_t
|
||||
isc_mem_isovermem(isc_mem_t *ctx) {
|
||||
REQUIRE(VALID_CONTEXT(ctx));
|
||||
|
||||
/*
|
||||
* We don't bother to lock the context because 100% accuracy isn't
|
||||
* necessary (and even if we locked the context the returned value
|
||||
* could be different from the actual state when it's used anyway)
|
||||
*/
|
||||
return (ctx->is_overmem);
|
||||
}
|
||||
|
||||
void
|
||||
isc_mem_setname(isc_mem_t *ctx, const char *name, void *tag) {
|
||||
REQUIRE(VALID_CONTEXT(ctx));
|
||||
|
@ -14,7 +14,7 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: lwres.html,v 1.23.418.1.8.1 2010/02/25 12:16:40 tbox Exp $ -->
|
||||
<!-- $Id: lwres.html,v 1.23.418.1.10.1 2010/03/03 22:06:39 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
|
@ -14,7 +14,7 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: lwres_buffer.html,v 1.21.418.1.8.1 2010/02/25 12:16:40 tbox Exp $ -->
|
||||
<!-- $Id: lwres_buffer.html,v 1.21.418.1.10.1 2010/03/03 22:06:39 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
|
@ -14,7 +14,7 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: lwres_config.html,v 1.22.418.1.8.1 2010/02/25 12:16:41 tbox Exp $ -->
|
||||
<!-- $Id: lwres_config.html,v 1.22.418.1.10.1 2010/03/03 22:06:39 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
|
@ -14,7 +14,7 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: lwres_context.html,v 1.23.418.1.8.1 2010/02/25 12:16:41 tbox Exp $ -->
|
||||
<!-- $Id: lwres_context.html,v 1.23.418.1.10.1 2010/03/03 22:06:39 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
|
@ -14,7 +14,7 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: lwres_gabn.html,v 1.24.418.1.8.1 2010/02/25 12:16:41 tbox Exp $ -->
|
||||
<!-- $Id: lwres_gabn.html,v 1.24.418.1.10.1 2010/03/03 22:06:39 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
|
@ -14,7 +14,7 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: lwres_gai_strerror.html,v 1.24.418.1.8.1 2010/02/25 12:16:43 tbox Exp $ -->
|
||||
<!-- $Id: lwres_gai_strerror.html,v 1.24.418.1.10.1 2010/03/03 22:06:39 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
|
@ -14,7 +14,7 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: lwres_getaddrinfo.html,v 1.27.418.1.8.1 2010/02/25 12:16:43 tbox Exp $ -->
|
||||
<!-- $Id: lwres_getaddrinfo.html,v 1.27.418.1.10.1 2010/03/03 22:06:39 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
|
@ -14,7 +14,7 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: lwres_gethostent.html,v 1.24.418.1.8.1 2010/02/25 12:16:44 tbox Exp $ -->
|
||||
<!-- $Id: lwres_gethostent.html,v 1.24.418.1.10.1 2010/03/03 22:06:39 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
|
@ -14,7 +14,7 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: lwres_getipnode.html,v 1.25.418.1.8.1 2010/02/25 12:16:44 tbox Exp $ -->
|
||||
<!-- $Id: lwres_getipnode.html,v 1.25.418.1.10.1 2010/03/03 22:06:39 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
|
@ -14,7 +14,7 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: lwres_getnameinfo.html,v 1.23.418.1.8.1 2010/02/25 12:16:44 tbox Exp $ -->
|
||||
<!-- $Id: lwres_getnameinfo.html,v 1.23.418.1.10.1 2010/03/03 22:06:39 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
|
@ -14,7 +14,7 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: lwres_getrrsetbyname.html,v 1.23.418.1.8.1 2010/02/25 12:16:44 tbox Exp $ -->
|
||||
<!-- $Id: lwres_getrrsetbyname.html,v 1.23.418.1.10.1 2010/03/03 22:06:39 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
|
@ -14,7 +14,7 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: lwres_gnba.html,v 1.24.418.1.8.1 2010/02/25 12:16:42 tbox Exp $ -->
|
||||
<!-- $Id: lwres_gnba.html,v 1.24.418.1.10.1 2010/03/03 22:06:39 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
|
@ -14,7 +14,7 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: lwres_hstrerror.html,v 1.23.418.1.8.1 2010/02/25 12:16:44 tbox Exp $ -->
|
||||
<!-- $Id: lwres_hstrerror.html,v 1.23.418.1.10.1 2010/03/03 22:06:39 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
|
@ -14,7 +14,7 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: lwres_inetntop.html,v 1.23.418.1.8.1 2010/02/25 12:16:43 tbox Exp $ -->
|
||||
<!-- $Id: lwres_inetntop.html,v 1.23.418.1.10.1 2010/03/03 22:06:39 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
|
@ -14,7 +14,7 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: lwres_noop.html,v 1.25.418.1.8.1 2010/02/25 12:16:44 tbox Exp $ -->
|
||||
<!-- $Id: lwres_noop.html,v 1.25.418.1.10.1 2010/03/03 22:06:39 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
|
@ -14,7 +14,7 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: lwres_packet.html,v 1.26.418.1.8.1 2010/02/25 12:16:44 tbox Exp $ -->
|
||||
<!-- $Id: lwres_packet.html,v 1.26.418.1.10.1 2010/03/03 22:06:40 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
|
@ -14,7 +14,7 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: lwres_resutil.html,v 1.25.418.1.8.1 2010/02/25 12:16:44 tbox Exp $ -->
|
||||
<!-- $Id: lwres_resutil.html,v 1.25.418.1.10.1 2010/03/03 22:06:40 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
|
@ -1,10 +1,10 @@
|
||||
# $Id: version,v 1.43.12.8.2.4 2010/05/10 02:07:03 marka Exp $
|
||||
# $Id: version,v 1.43.12.8.4.3 2010/09/03 02:57:11 marka Exp $
|
||||
#
|
||||
# This file must follow /bin/sh rules. It is imported directly via
|
||||
# configure.
|
||||
#
|
||||
MAJORVER=9
|
||||
MINORVER=6
|
||||
PATCHVER=2
|
||||
RELEASETYPE=-P
|
||||
RELEASEVER=2
|
||||
PATCHVER=
|
||||
RELEASETYPE=-ESV
|
||||
RELEASEVER=-R2
|
||||
|
@ -10,8 +10,6 @@
|
||||
#include <sys/ioctl.h>
|
||||
#include <syslog.h>
|
||||
#ifdef IPFILTER_BPF
|
||||
# include "pcap-bpf.h"
|
||||
# define _NET_BPF_H_
|
||||
# include <pcap.h>
|
||||
#endif
|
||||
#include "netinet/ip_pool.h"
|
||||
|
@ -1,4 +1,77 @@
|
||||
@(#) $Header: /tcpdump/master/libpcap/CHANGES,v 1.67.2.4 2008-10-28 00:27:42 ken Exp $ (LBL)
|
||||
Thu. April 1, 2010. guy@alum.mit.edu.
|
||||
Summary for 1.1.1 libpcap release
|
||||
Update CHANGES to reflect more of the changes in 1.1.0.
|
||||
Fix build on RHEL5.
|
||||
Fix shared library build on AIX.
|
||||
|
||||
Thu. March 11, 2010. ken@netfunctional.ca/guy@alum.mit.edu.
|
||||
Summary for 1.1.0 libpcap release
|
||||
Add SocketCAN capture support
|
||||
Add Myricom SNF API support
|
||||
Update Endace DAG and ERF support
|
||||
Add support for shared libraries on Solaris, HP-UX, and AIX
|
||||
Build, install, and un-install shared libraries by default;
|
||||
don't build/install shared libraries on platforms we don't support
|
||||
Fix building from a directory other than the source directory
|
||||
Fix compiler warnings and builds on some platforms
|
||||
Update config.guess and config.sub
|
||||
Support monitor mode on mac80211 devices on Linux
|
||||
Fix USB memory-mapped capturing on Linux; it requires a new DLT_
|
||||
value
|
||||
On Linux, scan /sys/class/net for devices if we have it; scan
|
||||
it, or /proc/net/dev if we don't have /sys/class/net, even if
|
||||
we have getifaddrs(), as it'll find interfaces with no
|
||||
addresses
|
||||
Add limited support for reading pcap-ng files
|
||||
Fix BPF driver-loading error handling on AIX
|
||||
Support getting the full-length interface description on FreeBSD
|
||||
In the lexical analyzer, free up any addrinfo structure we got back
|
||||
from getaddrinfo().
|
||||
Add support for BPF and libdlpi in OpenSolaris (and SXCE)
|
||||
Hyphenate "link-layer" everywhere
|
||||
Add /sys/kernel/debug/usb/usbmon to the list of usbmon locations
|
||||
In pcap_read_linux_mmap(), if there are no frames available, call
|
||||
poll() even if we're in non-blocking mode, so we pick up
|
||||
errors, and check for the errors in question.
|
||||
Note that poll() works on BPF devices is Snow Leopard
|
||||
If an ENXIO or ENETDOWN is received, it may mean the device has
|
||||
gone away. Deal with it.
|
||||
For BPF, raise the default capture buffer size to from 32k to 512k
|
||||
Support ps_ifdrop on Linux
|
||||
Added a bunch of #ifdef directives to make wpcap.dll (WinPcap) compile
|
||||
under cygwin.
|
||||
Changes to Linux mmapped captures.
|
||||
Fix bug where create_ring would fail for particular snaplen and
|
||||
buffer size combinations
|
||||
Update pcap-config so that it handles libpcap requiring
|
||||
additional libraries
|
||||
Add workaround for threadsafeness on Windows
|
||||
Add missing mapping for DLT_ENC <-> LINKTYPE_ENC
|
||||
DLT: Add DLT_CAN_SOCKETCAN
|
||||
DLT: Add Solaris ipnet
|
||||
Don't check for DLT_IPNET if it's not defined
|
||||
Add link-layer types for Fibre Channel FC-2
|
||||
Add link-layer types for Wireless HART
|
||||
Add link-layer types for AOS
|
||||
Add link-layer types for DECT
|
||||
Autoconf fixes (AIX, HP-UX, OSF/1, Tru64 cleanups)
|
||||
Install headers unconditionally, and include vlan.h/bluetooth.h if
|
||||
enabled
|
||||
Autoconf fixes+cleanup
|
||||
Support enabling/disabling bluetooth (--{en,dis}able-bluetooth)
|
||||
Support disabling SITA support (--without-sita)
|
||||
Return -1 on failure to create packet ring (if supported but
|
||||
creation failed)
|
||||
Fix handling of 'any' device, so that it can be opened, and no longer
|
||||
attempt to open it in Monitor mode
|
||||
Add support for snapshot length for USB Memory-Mapped Interface
|
||||
Fix configure and build on recent Linux kernels
|
||||
Fix memory-mapped Linux capture to support pcap_next() and
|
||||
pcap_next_ex()
|
||||
Fixes for Linux USB capture
|
||||
DLT: Add DLT_LINUX_EVDEV
|
||||
DLT: Add DLT_GSMTAP_UM
|
||||
DLT: Add DLT_GSMTAP_ABIS
|
||||
|
||||
Mon. October 27, 2008. ken@netfunctional.ca. Summary for 1.0.0 libpcap release
|
||||
Compile with IPv6 support by default
|
||||
@ -12,7 +85,10 @@ Mon. October 27, 2008. ken@netfunctional.ca. Summary for 1.0.0 libpcap rele
|
||||
Variable length 802.11 header support
|
||||
X2E data type support
|
||||
SITA ACN Interface support - see README.sita
|
||||
Support for memory-mapped capture on Linux
|
||||
Support for zerocopy BPF on platforms that support it
|
||||
Support for setting buffer size when opening devices
|
||||
Support for setting monitor mode when opening 802.11 devices
|
||||
Better support for dealing with VLAN tagging/stripping on Linux
|
||||
Fix dynamic library support on OSX
|
||||
Return PCAP_ERROR_IFACE_NOT_UP if the interface isn't 'UP', so applications
|
||||
@ -22,7 +98,7 @@ Mon. October 27, 2008. ken@netfunctional.ca. Summary for 1.0.0 libpcap rele
|
||||
On Linux, ignore ENETDOWN so we can continue to capture packets if the
|
||||
interface goes down and comes back up again.
|
||||
On Linux, support new tpacket frame headers (2.6.27+)
|
||||
On Mac OS X, add scripts for changing permissions on /dev/pbf* and launchd plist
|
||||
On Mac OS X, add scripts for changing permissions on /dev/bpf* and launchd plist
|
||||
On Solaris, support 'passive mode' on systems that support it
|
||||
Fixes to autoconf and general build environment
|
||||
Man page reorganization + cleanup
|
||||
|
@ -10,9 +10,10 @@ The current maintainers:
|
||||
Additional people who have contributed patches:
|
||||
|
||||
Alan Bawden <Alan at LCS dot MIT dot EDU>
|
||||
Albert Chin <china at thewrittenword dot com>
|
||||
Alexander 'Leo' Bergolth <Leo dot Bergolth at wu-wien dot ac dot at>
|
||||
Alexey Kuznetsov <kuznet at ms2 dot inr dot ac dot ru>
|
||||
Albert Chin <china at thewrittenword dot com>
|
||||
Alon Bar-Lev <alonbl at sourceforge dot net>
|
||||
Andrew Brown <atatat at atatdot dot net>
|
||||
Antti Kantee <pooka at netbsd dot org>
|
||||
Arien Vijn <arienvijn at sourceforge dot net>
|
||||
@ -23,24 +24,28 @@ Additional people who have contributed patches:
|
||||
Charles M. Hannum <mycroft at netbsd dot org>
|
||||
Chris G. Demetriou <cgd at netbsd dot org>
|
||||
Chris Lightfoot <cwrl at users dot sourceforge dot net>
|
||||
Chris Maynard <Chris dot Maynard at gtech dot com>
|
||||
Chris Pepper <pepper at mail dot reppep dot com>
|
||||
Christian Bell <csbell at myri dot com>
|
||||
Christian Peron <csjp at freebsd dot org>
|
||||
Daniele Orlandi <daniele at orlandi dot com>
|
||||
Darren Reed <darrenr at reed dot wattle dot id dot au>
|
||||
Darren Reed <darrenr at sun dot com>
|
||||
David Kaelbling <drk at sgi dot com>
|
||||
David Young <dyoung at ojctech dot com>
|
||||
Dean Gaudet <dean at arctic dot org>
|
||||
Don Ebright <Don dot Ebright at compuware dot com>
|
||||
Dug Song <dugsong at monkey dot org>
|
||||
Dustin Spicuzza <dustin at virtualroadside dot com>
|
||||
Eric Anderson <anderse at hpl dot hp dot com>
|
||||
Erik de Castro Lopo <erik dot de dot castro dot lopo at sensorynetworks dot com>
|
||||
Felix Obenhuber <felix at obenhuber dot de>
|
||||
Florent Drouin <Florent dot Drouin at alcatel-lucent dot fr>
|
||||
Franz Schaefer <schaefer at mond dot at>
|
||||
Fulko Hew <fulko dot hew at gmail dot com>
|
||||
Fumiyuki Shimizu <fumifumi at abacustech dot jp>
|
||||
Gianluca Varenni <varenni at netgroup-serv dot polito dot it>
|
||||
Gilbert Hoyek <gil_hoyek at hotmail dot com>
|
||||
Gisle Vanem <gvanem at broadpark dot no>
|
||||
Gisle Vanem <giva at bgnett dot no>
|
||||
Graeme Hewson <ghewson at cix dot compulink dot co dot uk>
|
||||
Greg Stark <gsstark at mit dot edu>
|
||||
Greg Troxel <gdt at ir dot bbn dot com>
|
||||
@ -53,11 +58,13 @@ Additional people who have contributed patches:
|
||||
Jason R. Thorpe <thorpej at netbsd dot org>
|
||||
Javier Achirica <achirica at ttd dot net>
|
||||
Jean Tourrilhes <jt at hpl dot hp dot com>
|
||||
Jean-Louis Charton <Jean-Louis.CHARTON at oikialog dot com>
|
||||
Jefferson Ogata <jogata at nodc dot noaa dot gov>
|
||||
Jesper Peterson <jesper at endace dot com>
|
||||
Joerg Mayer <jmayer at loplof dot de>
|
||||
John Bankier <jbankier at rainfinity dot com>
|
||||
Jon Lindgren <jonl at yubyub dot net>
|
||||
Jon Smirl <jonsmirl at gmail dot com>
|
||||
Juergen Schoenwaelder <schoenw at ibr dot cs dot tu-bs dot de>
|
||||
Jung-uk Kim <jkim at FreeBSD dot org>
|
||||
Kazushi Sugyo <sugyo at pb dot jp dot nec dot com>
|
||||
@ -67,19 +74,22 @@ Additional people who have contributed patches:
|
||||
Krzysztof Halasa <khc at pm dot waw dot pl>
|
||||
Lorenzo Cavallaro <sullivan at sikurezza dot org>
|
||||
Loris Degioanni <loris at netgroup-serv dot polito dot it>
|
||||
Love Hörnquist-Åstrand <lha at stacken dot kth dot se>
|
||||
Love Hörnquist-Åstrand <lha at stacken dot kth dot se>
|
||||
Luis Martin Garcia <luis dot mgarc at gmail dot com>
|
||||
Maciej W. Rozycki <macro at ds2 dot pg dot gda dot pl>
|
||||
Marcus Felipe Pereira <marcus at task dot com dot br>
|
||||
Mark C. Brown <mbrown at hp dot com>
|
||||
Mark Pizzolato <List-tcpdump-workers at subscriptions dot pizzolato dot net>
|
||||
Markus Mayer <markus_mayer at sourceforge dot net>
|
||||
Martin Husemann <martin at netbsd dot org>
|
||||
Márton Németh <nm127 at freemail dot hu>
|
||||
Matthew Luckie <mjl at luckie dot org dot nz>
|
||||
Max Laier <max at love2party dot net>
|
||||
Mike Frysinger <vapier at gmail dot com>
|
||||
Mike Kershaw <dragorn at kismetwireless dot net>
|
||||
Mike Wiacek <mike at iroot dot net>
|
||||
Monroe Williams <monroe at pobox dot com>
|
||||
N. Leiten <nleiten at sourceforge dot net>
|
||||
Nicolas Dade <ndade at nsd dot dyndns dot org>
|
||||
Octavian Cerna <tavy at ylabs dot com>
|
||||
Olaf Kirch <okir at caldera dot de>
|
||||
@ -93,15 +103,20 @@ Additional people who have contributed patches:
|
||||
Pawel Pokrywka <publicpp at gmail dot com>
|
||||
Peter Fales <peter at fales-lorenz dot net>
|
||||
Peter Jeremy <peter dot jeremy at alcatel dot com dot au>
|
||||
Peter Volkov <pva at gentoo dot org>
|
||||
Phil Wood <cpw at lanl dot gov>
|
||||
Rafal Maszkowski <rzm at icm dot edu dot pl>
|
||||
<rcb-isis at users dot sourceforge dot net>
|
||||
Richard Stearn <richard at rns-stearn dot demon dot co dot uk>
|
||||
Rick Jones <raj at cup dot hp dot com>
|
||||
Robert Edmonds <stu-42 at sourceforge dot net>
|
||||
Roberto Mariani <jelot-tcpdump at jelot dot it>
|
||||
Romain Francoise <rfrancoise at debian dot org>
|
||||
Sagun Shakya <sagun dot shakya at sun dot com>
|
||||
Scott Barron <sb125499 at ohiou dot edu>
|
||||
Scott Gifford <sgifford at tir dot com>
|
||||
Sebastian Krahmer <krahmer at cs dot uni-potsdam dot de>
|
||||
Sebastien Roy <Sebastien dot Roy at Sun dot COM>
|
||||
Sepherosa Ziehau <sepherosa at gmail dot com>
|
||||
Shaun Clowes <delius at progsoc dot uts dot edu dot au>
|
||||
Solomon Peachy <pizza at shaftnet dot org>
|
||||
@ -109,12 +124,16 @@ Additional people who have contributed patches:
|
||||
Stephen Donnelly <stephen at endace dot com>
|
||||
Takashi Yamamoto <yamt at mwd dot biglobe dot ne dot jp>
|
||||
Tanaka Shin-ya <zstanaka at archer dot livedoor dot com>
|
||||
Tobias Poschwatta <posch at sourceforge dot net>
|
||||
Tony Li <tli at procket dot com>
|
||||
Torsten Landschoff <torsten at debian dot org>
|
||||
Uns Lider <unslider at miranda dot org>
|
||||
Uwe Girlich <Uwe dot Girlich at philosys dot de>
|
||||
Wesley Shields <wxs at FreeBSD dot org>
|
||||
Xianjie Zhang <xzhang at cup dot hp dot com>
|
||||
Xin Li <delphij at FreeBSD dot org>
|
||||
Yen Yen Lim
|
||||
Yvan Vanhullebus <vanhu at sourceforge dot net>
|
||||
Yoann Vandoorselaere <yoann at prelude-ids dot org>
|
||||
|
||||
The original LBL crew:
|
||||
|
@ -1,7 +0,0 @@
|
||||
$FreeBSD$
|
||||
*/README.*
|
||||
*/msdos
|
||||
*/SUNOS4
|
||||
*/Win32
|
||||
*/ChmodBPF
|
||||
*/*.plist
|
@ -1,35 +0,0 @@
|
||||
$FreeBSD$
|
||||
|
||||
This directory contains virgin copies of the original distribution files
|
||||
on a "vendor" branch. Do not, under any circumstances, attempt to upgrade
|
||||
the files in this directory via patches and a cvs commit.
|
||||
|
||||
To upgrade to a newer version of libpcap, when it is available:
|
||||
1. Unpack the new version into an empty directory.
|
||||
[Do not make ANY changes to the files.]
|
||||
|
||||
2. Use the command:
|
||||
cvs import -m 'Import of libpcap v<version>' \
|
||||
-I SUNOS4 -I msdos -I Win32 -I missing \
|
||||
-I ChmodBPF -I linux-include \
|
||||
src/contrib/libpcap TCPDUMP_ORG v<version>
|
||||
|
||||
For example, to do the import of version 0.9.4, I typed:
|
||||
cvs import -m 'Import of libpcap v0.9.4 \
|
||||
-I SUNOS4 -I msdos -I Win32 -I missing \
|
||||
-I ChmodBPF -I linux-include \
|
||||
src/contrib/libpcap TCPDUMP_ORG v0_9_4
|
||||
|
||||
3. Follow the instructions printed out in step 2 to resolve any
|
||||
conflicts between local FreeBSD changes and the newer version.
|
||||
4. Bump __FreeBSD_version in sys/param.h as appropriate
|
||||
|
||||
Do not, under any circumstances, deviate from this procedure.
|
||||
|
||||
To make local changes to libpcap, simply patch and commit to the main
|
||||
branch (aka HEAD). Never make local changes on the TCPDUMP_ORG branch.
|
||||
|
||||
All local changes should be submitted to "tcpdump-workers@tcpdump.org" for
|
||||
inclusion in the next vendor release of tcpdump and libpcap.
|
||||
|
||||
sam@freebsd.org - 4 September 2006
|
@ -1,4 +1,4 @@
|
||||
@(#) $Header: /tcpdump/master/libpcap/INSTALL.txt,v 1.21.2.8 2008-06-12 20:25:38 guy Exp $ (LBL)
|
||||
@(#) $Header: /tcpdump/master/libpcap/INSTALL.txt,v 1.29 2008-06-12 20:21:51 guy Exp $ (LBL)
|
||||
|
||||
To build libpcap, run "./configure" (a shell script). The configure
|
||||
script will determine your system attributes and generate an
|
||||
|
@ -17,7 +17,7 @@
|
||||
# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
#
|
||||
# @(#) $Header: /tcpdump/master/libpcap/Makefile.in,v 1.108.2.28 2008-10-23 22:13:21 guy Exp $ (LBL)
|
||||
# @(#) $Header: /tcpdump/master/libpcap/Makefile.in,v 1.142 2008-11-22 17:30:24 guy Exp $ (LBL)
|
||||
|
||||
#
|
||||
# Various configurable paths (remember to edit Makefile.in, not Makefile)
|
||||
@ -44,14 +44,17 @@ VPATH = @srcdir@
|
||||
# You shouldn't need to edit anything below.
|
||||
#
|
||||
|
||||
LD = /usr/bin/ld
|
||||
CC = @CC@
|
||||
CCOPT = @V_CCOPT@
|
||||
INCLS = -I. @V_INCLS@
|
||||
DEFS = @DEFS@ @V_DEFS@
|
||||
LIBS = @V_LIBS@
|
||||
DAGLIBS = @DAGLIBS@
|
||||
DEPLIBS = @DEPLIBS@
|
||||
ADDLOBJS = @ADDLOBJS@
|
||||
ADDLARCHIVEOBJS = @ADDLARCHIVEOBJS@
|
||||
LIBS = @LIBS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
DYEXT = @DYEXT@
|
||||
V_RPATH_OPT = @V_RPATH_OPT@
|
||||
PROG=libpcap
|
||||
|
||||
# Standard CFLAGS
|
||||
@ -77,12 +80,13 @@ YACC = @V_YACC@
|
||||
@rm -f $@
|
||||
$(CC) $(CFLAGS) -c $(srcdir)/$*.c
|
||||
|
||||
PSRC = pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@
|
||||
PSRC = pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@ @CAN_SRC@
|
||||
FSRC = fad-@V_FINDALLDEVS@.c
|
||||
SSRC = @SSRC@
|
||||
CSRC = pcap.c inet.c gencode.c optimize.c nametoaddr.c \
|
||||
etherent.c savefile.c bpf_filter.c bpf_image.c bpf_dump.c
|
||||
GENSRC = scanner.c grammar.c version.c
|
||||
CSRC = pcap.c inet.c gencode.c optimize.c nametoaddr.c etherent.c \
|
||||
savefile.c sf-pcap.c sf-pcap-ng.c pcap-common.c \
|
||||
bpf_image.c bpf_dump.c
|
||||
GENSRC = scanner.c grammar.c bpf_filter.c version.c
|
||||
LIBOBJS = @LIBOBJS@
|
||||
|
||||
SRC = $(PSRC) $(FSRC) $(CSRC) $(SSRC) $(GENSRC)
|
||||
@ -90,8 +94,20 @@ SRC = $(PSRC) $(FSRC) $(CSRC) $(SSRC) $(GENSRC)
|
||||
# We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
|
||||
# hack the extra indirection
|
||||
OBJ = $(PSRC:.c=.o) $(FSRC:.c=.o) $(CSRC:.c=.o) $(SSRC:.c=.o) $(GENSRC:.c=.o) $(LIBOBJS)
|
||||
HDR = \
|
||||
acconfig.h \
|
||||
PUBHDR = \
|
||||
pcap.h \
|
||||
pcap-bpf.h \
|
||||
pcap-namedb.h \
|
||||
pcap/bpf.h \
|
||||
pcap/bluetooth.h \
|
||||
pcap/ipnet.h \
|
||||
pcap/namedb.h \
|
||||
pcap/pcap.h \
|
||||
pcap/sll.h \
|
||||
pcap/vlan.h \
|
||||
pcap/usb.h
|
||||
|
||||
HDR = $(PUBHDR) \
|
||||
arcnet.h \
|
||||
atmuni31.h \
|
||||
ethertype.h \
|
||||
@ -99,30 +115,23 @@ HDR = \
|
||||
ieee80211.h \
|
||||
llc.h \
|
||||
nlpid.h \
|
||||
pcap/bluetooth.h \
|
||||
pcap/bpf.h \
|
||||
pcap/namedb.h \
|
||||
pcap/pcap.h \
|
||||
pcap/sll.h \
|
||||
pcap/usb.h \
|
||||
pcap/vlan.h \
|
||||
pcap.h \
|
||||
pcap-common.h \
|
||||
pcap-int.h \
|
||||
pcap-namedb.h \
|
||||
pcap-stdinc.h \
|
||||
ppp.h \
|
||||
sf-pcap.h \
|
||||
sf-pcap-ng.h \
|
||||
sunatmpos.h
|
||||
|
||||
GENHDR = \
|
||||
scanner.h tokdefs.h version.h
|
||||
|
||||
TAGHDR = \
|
||||
pcap-bpf.h
|
||||
|
||||
TAGFILES = \
|
||||
$(SRC) $(HDR) $(TAGHDR)
|
||||
$(SRC) $(HDR)
|
||||
|
||||
CLEANFILES = $(OBJ) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c
|
||||
CLEANFILES = $(OBJ) libpcap.* filtertest findalldevstest selpolltest \
|
||||
opentest $(PROG)-`cat $(srcdir)/VERSION`.tar.gz $(GENSRC) $(GENHDR) \
|
||||
lex.yy.c pcap-config
|
||||
|
||||
MAN1 = pcap-config.1
|
||||
|
||||
@ -254,13 +263,14 @@ EXTRA_DIST = \
|
||||
msdos/pktdrvr.c \
|
||||
msdos/pktdrvr.h \
|
||||
msdos/readme.dos \
|
||||
net/bpf_filter.c \
|
||||
opentest.c \
|
||||
org.tcpdump.chmod_bpf.plist \
|
||||
packaging/pcap.spec.in \
|
||||
pcap-bpf.c \
|
||||
pcap-bpf.h \
|
||||
pcap-bt-linux.c \
|
||||
pcap-bt-linux.h \
|
||||
pcap-can-linux.c \
|
||||
pcap-can-linux.h \
|
||||
pcap-config.in \
|
||||
pcap-dag.c \
|
||||
pcap-dag.h \
|
||||
@ -280,6 +290,8 @@ EXTRA_DIST = \
|
||||
pcap-sita.h \
|
||||
pcap-sita.c \
|
||||
pcap-sita.html \
|
||||
pcap-snf.c \
|
||||
pcap-snf.h \
|
||||
pcap-snit.c \
|
||||
pcap-snoop.c \
|
||||
pcap-usb-linux.c \
|
||||
@ -287,6 +299,7 @@ EXTRA_DIST = \
|
||||
pcap-win32.c \
|
||||
runlex.sh \
|
||||
scanner.l \
|
||||
selpolltest.c \
|
||||
Win32/Include/Gnuc.h \
|
||||
Win32/Include/addrinfo.h \
|
||||
Win32/Include/bittypes.h \
|
||||
@ -311,42 +324,94 @@ EXTRA_DIST = \
|
||||
Win32/Src/inet_net.c \
|
||||
Win32/Src/inet_pton.c
|
||||
|
||||
all: libpcap.a pcap-config
|
||||
all: libpcap.a shared pcap-config
|
||||
|
||||
libpcap.a: $(OBJ)
|
||||
@rm -f $@
|
||||
$(AR) rc $@ $(OBJ) $(LIBS)
|
||||
ar rc $@ $(OBJ) $(ADDLARCHIVEOBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
shared: libpcap.$(DYEXT)
|
||||
|
||||
#
|
||||
# XXX - this works with GNU ld, but won't necessarily work with native
|
||||
# ld on, for example, various SVR4-flavored platforms, or Digital UNIX.
|
||||
#
|
||||
libpcap.so: $(OBJ)
|
||||
@rm -f $@
|
||||
$(CC) -shared -Wl,-soname,$@.1 -o $@.`cat $(srcdir)/VERSION` $(OBJ) $(DAGLIBS)
|
||||
VER=`cat $(srcdir)/VERSION`; \
|
||||
MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
|
||||
@V_SHLIB_CMD@ @V_SHLIB_OPT@ @V_SONAME_OPT@$@.$$MAJOR_VER $(LDFLAGS) \
|
||||
-o $@.$$VER $(OBJ) $(ADDLOBJS) $(LIBS)
|
||||
|
||||
#
|
||||
# The following rule succeeds, but the result is untested.
|
||||
#
|
||||
# XXX - OS X installs the library as "libpcap.A.dylib", with that as the
|
||||
# install_name, and sets the current version to 1 as well. VERSION
|
||||
# might contain a not-purely-numeric version number, but
|
||||
# -current_version requires a purely numeric version, so this won't
|
||||
# work with top-of-tree builds.
|
||||
# In Mac OS X, the libpcap dylib has the name "libpcap.A.dylib", with
|
||||
# its full path as the install_name, and with the compatibility and
|
||||
# current version both set to 1. The compatibility version is set to
|
||||
# 1 so that programs built with a newer version of the library will run
|
||||
# against older versions; multi-platform software probably will fail if
|
||||
# it uses APIs added in the newer version, but Mac OS X-specific software
|
||||
# will use weak linking and check at run time whether those APIs are
|
||||
# available.
|
||||
#
|
||||
# We also use "A" as the major version, and 1 as the compatibility version,
|
||||
# but set the current version to the value in VERSION, with any non-numeric
|
||||
# stuff stripped off (the compatibility and current version must be of the
|
||||
# form X[.Y[.Z]], with Y and Z possibly absent, and with all components
|
||||
# numeric).
|
||||
#
|
||||
libpcap.dylib: $(OBJ)
|
||||
rm -f libpcap*.dylib
|
||||
$(CC) -dynamiclib -undefined error -o libpcap.`cat $(srcdir)/VERSION`.dylib $(OBJ) \
|
||||
-install_name $(libdir)/libpcap.A.dylib \
|
||||
-compatibility_version 1 \
|
||||
-current_version `sed 's/[^0-9.].*$$//' $(srcdir)/VERSION`
|
||||
VER=`cat $(srcdir)/VERSION`; \
|
||||
MAJOR_VER=A; \
|
||||
COMPAT_VER=1; \
|
||||
CURRENT_VER=`sed 's/[^0-9.].*$$//' $(srcdir)/VERSION`; \
|
||||
$(CC) -dynamiclib -undefined error $(LDFLAGS) \
|
||||
-o libpcap.$$VER.dylib $(OBJ) $(ADDLOBJS) $(LIBS) \
|
||||
-install_name $(libdir)/libpcap.$$MAJOR_VER.dylib \
|
||||
-compatibility_version $$COMPAT_VER \
|
||||
-current_version $$CURRENT_VER
|
||||
|
||||
#
|
||||
# The HP-UX linker manual says that the convention for a versioned library
|
||||
# is libXXX.{number}, not libXXX.sl.{number}. That appears to be the case
|
||||
# on at least one HP-UX 11.00 system; libXXX.sl is a symlink to
|
||||
# libXXX.{number}.
|
||||
#
|
||||
# The manual also says "library-level versioning" (think "sonames") was
|
||||
# added in HP-UX 10.0.
|
||||
#
|
||||
# XXX - this assumes we're using the HP linker, rather than the GNU
|
||||
# linker, even with GCC.
|
||||
#
|
||||
libpcap.sl: $(OBJ)
|
||||
@MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
|
||||
rm -f libpcap.$$MAJOR_VER
|
||||
MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
|
||||
ld -b $(LDFLAGS) -o libpcap.$$MAJOR_VER +h libpcap.$$MAJOR_VER \
|
||||
$(OBJ) $(ADDLOBJS) $(LIBS)
|
||||
|
||||
#
|
||||
# AIX is different from everybody else. A shared library is an archive
|
||||
# library with one or more shared-object components. We still build a
|
||||
# normal static archive library on AIX, for the benefit of the traditional
|
||||
# scheme of building libpcap and tcpdump in subdirectories of the
|
||||
# same directory, with tcpdump statically linked with the libpcap
|
||||
# in question, but we also build a shared library as "libpcap.shareda"
|
||||
# and install *it*, rather than the static library, as "libpcap.a".
|
||||
#
|
||||
libpcap.shareda: $(OBJ)
|
||||
@rm -f $@ shr.o
|
||||
$(CC) @V_SHLIB_OPT@ -o shr.o $(OBJ) $(ADDLOBJS) $(LDFLAGS) $(LIBS)
|
||||
ar rc $@ shr.o
|
||||
|
||||
#
|
||||
# For platforms that don't support shared libraries (or on which we
|
||||
# don't support shared libraries).
|
||||
#
|
||||
libpcap.none:
|
||||
|
||||
scanner.c: $(srcdir)/scanner.l
|
||||
@rm -f $@
|
||||
./runlex.sh $(LEX) -o$@ $<
|
||||
$(srcdir)/runlex.sh $(LEX) -o$@ $<
|
||||
|
||||
scanner.o: scanner.c tokdefs.h
|
||||
$(CC) $(CFLAGS) -c scanner.c
|
||||
@ -372,7 +437,13 @@ snprintf.o: $(srcdir)/missing/snprintf.c
|
||||
|
||||
version.c: $(srcdir)/VERSION
|
||||
@rm -f $@
|
||||
sed -e 's/.*/char pcap_version[] = "&";/' $(srcdir)/VERSION > $@
|
||||
if grep GIT ${srcdir}/VERSION >/dev/null; then \
|
||||
read ver <${srcdir}/VERSION; \
|
||||
echo $$ver | tr -d '\012'; \
|
||||
date +_%Y_%m_%d; \
|
||||
else \
|
||||
cat ${srcdir}/VERSION; \
|
||||
fi | sed -e 's/.*/char pcap_version[] = "&";/' > $@
|
||||
|
||||
#
|
||||
# NOTE: this really is supposed to be static; importing a string
|
||||
@ -383,7 +454,13 @@ version.c: $(srcdir)/VERSION
|
||||
#
|
||||
version.h: $(srcdir)/VERSION
|
||||
@rm -f $@
|
||||
sed -e 's/.*/static const char pcap_version_string[] = "libpcap version &";/' $(srcdir)/VERSION > $@
|
||||
if grep GIT ${srcdir}/VERSION >/dev/null; then \
|
||||
read ver <${srcdir}/VERSION; \
|
||||
echo $$ver | tr -d '\012'; \
|
||||
date +_%Y_%m_%d; \
|
||||
else \
|
||||
cat ${srcdir}/VERSION; \
|
||||
fi | sed -e 's/.*/static const char pcap_version_string[] = "libpcap version &";/' > $@
|
||||
|
||||
bpf_filter.c: $(srcdir)/bpf/net/bpf_filter.c
|
||||
rm -f bpf_filter.c
|
||||
@ -395,12 +472,13 @@ bpf_filter.o: bpf_filter.c
|
||||
#
|
||||
# Generate the pcap-config script.
|
||||
#
|
||||
pcap-config: pcap-config.in Makefile
|
||||
pcap-config: $(srcdir)/pcap-config.in
|
||||
@rm -f $@ $@.tmp
|
||||
sed -e 's|@includedir[@]|$(includedir)|g' \
|
||||
-e 's|@libdir[@]|$(libdir)|g' \
|
||||
-e 's|@DEPLIBS[@]|$(DEPLIBS)|g' \
|
||||
pcap-config.in >$@.tmp
|
||||
-e 's|@LIBS[@]|$(LIBS)|g' \
|
||||
-e 's|@V_RPATH_OPT[@]|$(V_RPATH_OPT)|g' \
|
||||
$(srcdir)/pcap-config.in >$@.tmp
|
||||
mv $@.tmp $@
|
||||
chmod a+x $@
|
||||
|
||||
@ -408,16 +486,20 @@ pcap-config: pcap-config.in Makefile
|
||||
# Test programs - not built by default, and not installed.
|
||||
#
|
||||
filtertest: filtertest.c libpcap.a
|
||||
$(CC) $(CFLAGS) -I. -L. -o filtertest filtertest.c libpcap.a
|
||||
$(CC) $(CFLAGS) -I. -L. -o filtertest $(srcdir)/filtertest.c libpcap.a $(LIBS)
|
||||
|
||||
findalldevstest: findalldevstest.c libpcap.a
|
||||
$(CC) $(CFLAGS) -I. -L. -o findalldevstest findalldevstest.c libpcap.a
|
||||
$(CC) $(CFLAGS) -I. -L. -o findalldevstest $(srcdir)/findalldevstest.c libpcap.a $(LIBS)
|
||||
|
||||
install: libpcap.a pcap-config
|
||||
selpolltest: selpolltest.c libpcap.a
|
||||
$(CC) $(CFLAGS) -I. -L. -o selpolltest $(srcdir)/selpolltest.c libpcap.a $(LIBS)
|
||||
|
||||
opentest: opentest.c libpcap.a
|
||||
$(CC) $(CFLAGS) -I. -L. -o opentest $(srcdir)/opentest.c libpcap.a $(LIBS)
|
||||
|
||||
install: install-shared install-archive pcap-config
|
||||
[ -d $(DESTDIR)$(libdir) ] || \
|
||||
(mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
|
||||
$(INSTALL_DATA) libpcap.a $(DESTDIR)$(libdir)/libpcap.a
|
||||
$(RANLIB) $(DESTDIR)$(libdir)/libpcap.a
|
||||
[ -d $(DESTDIR)$(includedir) ] || \
|
||||
(mkdir -p $(DESTDIR)$(includedir); chmod 755 $(DESTDIR)$(includedir))
|
||||
[ -d $(DESTDIR)$(includedir)/pcap ] || \
|
||||
@ -430,91 +512,151 @@ install: libpcap.a pcap-config
|
||||
(mkdir -p $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@; chmod 755 $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@)
|
||||
[ -d $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@ ] || \
|
||||
(mkdir -p $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@; chmod 755 $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@)
|
||||
$(INSTALL_DATA) $(srcdir)/pcap/pcap.h \
|
||||
$(DESTDIR)$(includedir)/pcap/pcap.h
|
||||
$(INSTALL_DATA) $(srcdir)/pcap/bpf.h \
|
||||
$(DESTDIR)$(includedir)/pcap/bpf.h
|
||||
$(INSTALL_DATA) $(srcdir)/pcap/namedb.h \
|
||||
$(DESTDIR)$(includedir)/pcap/namedb.h
|
||||
$(INSTALL_DATA) $(srcdir)/pcap/sll.h \
|
||||
$(DESTDIR)$(includedir)/pcap/sll.h
|
||||
$(INSTALL_DATA) $(srcdir)/pcap/usb.h \
|
||||
$(DESTDIR)$(includedir)/pcap/usb.h
|
||||
$(INSTALL_DATA) $(srcdir)/pcap.h $(DESTDIR)$(includedir)/pcap.h
|
||||
$(INSTALL_DATA) $(srcdir)/pcap-bpf.h \
|
||||
$(DESTDIR)$(includedir)/pcap-bpf.h
|
||||
$(INSTALL_DATA) $(srcdir)/pcap-namedb.h \
|
||||
$(DESTDIR)$(includedir)/pcap-namedb.h
|
||||
for i in $(PUBHDR); do \
|
||||
$(INSTALL_DATA) $(srcdir)/$$i \
|
||||
$(DESTDIR)$(includedir)/$$i; done
|
||||
[ -d $(DESTDIR)$(bindir) ] || \
|
||||
(mkdir -p $(DESTDIR)$(bindir); chmod 755 $(DESTDIR)$(bindir))
|
||||
$(INSTALL_PROGRAM) pcap-config $(DESTDIR)$(bindir)/pcap-config
|
||||
for i in $(MAN1); do \
|
||||
$(INSTALL_DATA) $(srcdir)/$$i \
|
||||
$(DESTDIR)$(mandir)/man1/$$i; done
|
||||
for i in $(MAN3PCAP); do \
|
||||
for i in $(MAN3PCAP_NOEXPAND); do \
|
||||
$(INSTALL_DATA) $(srcdir)/$$i \
|
||||
$(DESTDIR)$(mandir)/man3/$$i; done
|
||||
for i in $(MAN3PCAP_EXPAND:.in=); do \
|
||||
$(INSTALL_DATA) $$i \
|
||||
$(DESTDIR)$(mandir)/man3/$$i; done
|
||||
rm -f $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_description.3pcap
|
||||
ln $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_name.3pcap \
|
||||
$(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_description.3pcap
|
||||
rm -f $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap
|
||||
ln $(DESTDIR)$(mandir)/man3/pcap_dump_open.3pcap \
|
||||
$(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap
|
||||
rm -f $(DESTDIR)$(mandir)/man3/pcap_perror.3pcap
|
||||
ln $(DESTDIR)$(mandir)/man3/pcap_geterr.3pcap \
|
||||
$(DESTDIR)$(mandir)/man3/pcap_perror.3pcap
|
||||
rm -f $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap
|
||||
ln $(DESTDIR)$(mandir)/man3/pcap_inject.3pcap \
|
||||
$(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap
|
||||
rm -f $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap
|
||||
ln $(DESTDIR)$(mandir)/man3/pcap_loop.3pcap \
|
||||
$(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap
|
||||
rm -f $(DESTDIR)$(mandir)/man3/pcap_minor_version.3pcap
|
||||
ln $(DESTDIR)$(mandir)/man3/pcap_major_version.3pcap \
|
||||
$(DESTDIR)$(mandir)/man3/pcap_minor_version.3pcap
|
||||
rm -f $(DESTDIR)$(mandir)/man3/pcap_next.3pcap
|
||||
ln $(DESTDIR)$(mandir)/man3/pcap_next_ex.3pcap \
|
||||
$(DESTDIR)$(mandir)/man3/pcap_next.3pcap
|
||||
rm -f $(DESTDIR)$(mandir)/man3/pcap_fopen_offline.3pcap
|
||||
ln $(DESTDIR)$(mandir)/man3/pcap_open_offline.3pcap \
|
||||
$(DESTDIR)$(mandir)/man3/pcap_fopen_offline.3pcap
|
||||
rm -f $(DESTDIR)$(mandir)/man3/pcap_getnonblock.3pcap
|
||||
ln $(DESTDIR)$(mandir)/man3/pcap_setnonblock.3pcap \
|
||||
$(DESTDIR)$(mandir)/man3/pcap_getnonblock.3pcap
|
||||
for i in $(MANFILE); do \
|
||||
$(INSTALL_DATA) $(srcdir)/`echo $$i | sed 's/.manfile.in/.manfile/'` \
|
||||
$(INSTALL_DATA) `echo $$i | sed 's/.manfile.in/.manfile/'` \
|
||||
$(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
|
||||
for i in $(MANMISC); do \
|
||||
$(INSTALL_DATA) $(srcdir)/`echo $$i | sed 's/.manmisc.in/.manmisc/'` \
|
||||
$(INSTALL_DATA) `echo $$i | sed 's/.manmisc.in/.manmisc/'` \
|
||||
$(DESTDIR)$(mandir)/man@MAN_MISC_INFO@/`echo $$i | sed 's/.manmisc.in/.@MAN_MISC_INFO@/'`; done
|
||||
|
||||
install-shared: install-shared-$(DYEXT)
|
||||
install-shared-so: libpcap.so
|
||||
$(INSTALL_PROGRAM) libpcap.so.`cat VERSION` $(DESTDIR)$(libdir)/libpcap.so.`cat VERSION`
|
||||
[ -d $(DESTDIR)$(libdir) ] || \
|
||||
(mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
|
||||
VER=`cat $(srcdir)/VERSION`; \
|
||||
MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
|
||||
$(INSTALL_PROGRAM) libpcap.so.$$VER $(DESTDIR)$(libdir)/libpcap.so.$$VER; \
|
||||
ln -sf libpcap.so.$$VER $(DESTDIR)$(libdir)/libpcap.so.$$MAJOR_VER; \
|
||||
ln -sf libpcap.so.$$MAJOR_VER $(DESTDIR)$(libdir)/libpcap.so
|
||||
install-shared-dylib: libpcap.dylib
|
||||
$(INSTALL_PROGRAM) libpcap.`cat VERSION`.dylib $(DESTDIR)$(libdir)/libpcap.`cat VERSION`.dylib
|
||||
VER=`cat VERSION`; cd $(DESTDIR)$(libdir) && ln -sf libpcap.$$VER.dylib libpcap.A.dylib; ln -sf libpcap.A.dylib libpcap.dylib
|
||||
[ -d $(DESTDIR)$(libdir) ] || \
|
||||
(mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
|
||||
VER=`cat $(srcdir)/VERSION`; \
|
||||
MAJOR_VER=A; \
|
||||
$(INSTALL_PROGRAM) libpcap.$$VER.dylib $(DESTDIR)$(libdir)/libpcap.$$VER.dylib; \
|
||||
ln -sf libpcap.$$VER.dylib $(DESTDIR)$(libdir)/libpcap.$$MAJOR_VER.dylib; \
|
||||
ln -sf libpcap.$$MAJOR_VER.dylib $(DESTDIR)$(libdir)/libpcap.dylib
|
||||
install-shared-sl: libpcap.sl
|
||||
[ -d $(DESTDIR)$(libdir) ] || \
|
||||
(mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
|
||||
MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
|
||||
$(INSTALL_PROGRAM) libpcap.$$MAJOR_VER $(DESTDIR)$(libdir)
|
||||
ln -sf libpcap.$$MAJOR_VER $(DESTDIR)$(libdir)/libpcap.sl
|
||||
install-shared-shareda: libpcap.shareda
|
||||
#
|
||||
# AIX shared libraries are weird. They're archive libraries
|
||||
# with one or more shared object components.
|
||||
#
|
||||
[ -d $(DESTDIR)$(libdir) ] || \
|
||||
(mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
|
||||
$(INSTALL_PROGRAM) libpcap.shareda $(DESTDIR)$(libdir)/libpcap.a
|
||||
install-shared-none:
|
||||
|
||||
uninstall:
|
||||
install-archive: install-archive-$(DYEXT)
|
||||
install-archive-so install-archive-dylib install-archive-sl install-archive-none: libpcap.a
|
||||
#
|
||||
# Most platforms have separate suffixes for shared and
|
||||
# archive libraries, so we install both.
|
||||
#
|
||||
[ -d $(DESTDIR)$(libdir) ] || \
|
||||
(mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
|
||||
$(INSTALL_DATA) libpcap.a $(DESTDIR)$(libdir)/libpcap.a
|
||||
$(RANLIB) $(DESTDIR)$(libdir)/libpcap.a
|
||||
install-archive-shareda:
|
||||
#
|
||||
# AIX, however, doesn't, so we don't install the archive
|
||||
# library on AIX.
|
||||
#
|
||||
|
||||
uninstall: uninstall-shared
|
||||
rm -f $(DESTDIR)$(libdir)/libpcap.a
|
||||
rm -f $(DESTDIR)$(includedir)/pcap/pcap.h
|
||||
rm -f $(DESTDIR)$(includedir)/pcap/bpf.h
|
||||
rm -f $(DESTDIR)$(includedir)/pcap/namedb.h
|
||||
rm -f $(DESTDIR)$(includedir)/pcap/sll.h
|
||||
rm -f $(DESTDIR)$(includedir)/pcap/usb.h
|
||||
for i in $(PUBHDR); do \
|
||||
rm -f $(DESTDIR)$(includedir)/$$i; done
|
||||
-rmdir $(DESTDIR)$(includedir)/pcap
|
||||
rm -f $(DESTDIR)$(includedir)/pcap.h
|
||||
rm -f $(DESTDIR)$(includedir)/pcap-bpf.h
|
||||
rm -f $(DESTDIR)$(includedir)/pcap-namedb.h
|
||||
rm -f $(DESTDIR)/$(bindir)/pcap-config
|
||||
for i in $(MAN1); do \
|
||||
rm -f $(DESTDIR)$(mandir)/man1/$$i; done
|
||||
for i in $(MAN3PCAP); do \
|
||||
rm -f $(DESTDIR)$(mandir)/man3/$$i; done
|
||||
rm -f $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_description.3pcap
|
||||
rm -f $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap
|
||||
rm -f $(DESTDIR)$(mandir)/man3/pcap_perror.3pcap
|
||||
rm -f $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap
|
||||
rm -f $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap
|
||||
rm -f $(DESTDIR)$(mandir)/man3/pcap_minor_version.3pcap
|
||||
rm -f $(DESTDIR)$(mandir)/man3/pcap_next.3pcap
|
||||
rm -f $(DESTDIR)$(mandir)/man3/pcap_fopen_offline.3pcap
|
||||
rm -f $(DESTDIR)$(mandir)/man3/pcap_getnonblock.3pcap
|
||||
rm -f $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_description.3pcap
|
||||
rm -f $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap
|
||||
rm -f $(DESTDIR)$(mandir)/man3/pcap_perror.3pcap
|
||||
rm -f $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap
|
||||
rm -f $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap
|
||||
rm -f $(DESTDIR)$(mandir)/man3/pcap_minor_version.3pcap
|
||||
rm -f $(DESTDIR)$(mandir)/man3/pcap_next.3pcap
|
||||
rm -f $(DESTDIR)$(mandir)/man3/pcap_fopen_offline.3pcap
|
||||
rm -f $(DESTDIR)$(mandir)/man3/pcap_getnonblock.3pcap
|
||||
for i in $(MANFILE); do \
|
||||
rm -f $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
|
||||
for i in $(MANMISC); do \
|
||||
rm -f $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@/`echo $$i | sed 's/.manmisc.in/.@MAN_MISC_INFO@/'`; done
|
||||
|
||||
uninstall-shared: uninstall-shared-$(DYEXT)
|
||||
uninstall-shared-so:
|
||||
VER=`cat $(srcdir)/VERSION`; \
|
||||
MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
|
||||
rm -f $(DESTDIR)$(libdir)/libpcap.so.$$VER; \
|
||||
rm -f $(DESTDIR)$(libdir)/libpcap.so.$$MAJOR_VER; \
|
||||
rm -f $(DESTDIR)$(libdir)/libpcap.so
|
||||
uninstall-shared-dylib:
|
||||
VER=`cat $(srcdir)/VERSION`; \
|
||||
MAJOR_VER=A; \
|
||||
rm -f $(DESTDIR)$(libdir)/libpcap.$$VER.dylib; \
|
||||
rm -f $(DESTDIR)$(libdir)/libpcap.$$MAJOR_VER.dylib; \
|
||||
rm -f $(DESTDIR)$(libdir)/libpcap.dylib
|
||||
uninstall-shared-sl:
|
||||
MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
|
||||
rm -f $(DESTDIR)$(libdir)/libpcap.$$MAJOR_VER; \
|
||||
rm -f $(DESTDIR)$(libdir)/libpcap.sl
|
||||
uninstall-shared-shareda:
|
||||
rm -f $(DESTDIR)$(libdir)/libpcap.a
|
||||
uninstall-shared-none:
|
||||
|
||||
clean:
|
||||
rm -f $(CLEANFILES) libpcap*.dylib libpcap.so*
|
||||
rm -f $(CLEANFILES)
|
||||
|
||||
distclean: clean
|
||||
rm -f Makefile config.cache config.log config.status \
|
||||
@ -530,7 +672,7 @@ packaging/pcap.spec: packaging/pcap.spec.in VERSION
|
||||
RPMVERSION=`cat VERSION | sed s/-.*//g`; \
|
||||
sed -e s/@VERSION@/$$RPMVERSION/ -e s/@NAME@/libpcap-`cat VERSION`/ $< > $@
|
||||
|
||||
releasetar:
|
||||
releasetar:
|
||||
@cwd=`pwd` ; dir=`basename $$cwd` ; name=$(PROG)-`cat VERSION` ; \
|
||||
mkdir $$name; \
|
||||
tar cf - $(CSRC) $(HDR) $(MAN1) $(MAN3PCAP_EXPAND) \
|
||||
|
@ -1,19 +1,17 @@
|
||||
@(#) $Header: /tcpdump/master/libpcap/README,v 1.30.4.3 2008-10-17 10:39:20 ken Exp $ (LBL)
|
||||
@(#) $Header: /tcpdump/master/libpcap/README,v 1.34 2008-12-14 19:44:14 guy Exp $ (LBL)
|
||||
|
||||
LIBPCAP 1.0.0
|
||||
LIBPCAP 1.x.y
|
||||
|
||||
www.tcpdump.org
|
||||
|
||||
Please send inquiries/comments/reports to:
|
||||
tcpdump-workers@lists.tcpdump.org
|
||||
|
||||
Anonymous CVS is available via:
|
||||
cvs -d :pserver:tcpdump@cvs.tcpdump.org:/tcpdump/master login
|
||||
(password "anoncvs")
|
||||
cvs -d :pserver:tcpdump@cvs.tcpdump.org:/tcpdump/master checkout libpcap
|
||||
Anonymous Git is available via:
|
||||
git clone git://bpf.tcpdump.org/libpcap
|
||||
|
||||
Version 1.0.0 of LIBPCAP can be retrieved with the CVS tag "libpcap_1_0":
|
||||
cvs -d :pserver:tcpdump@cvs.tcpdump.org:/tcpdump/master checkout -r libpcap_1_0 libpcap
|
||||
Version 1.x.y of LIBPCAP can be retrieved with the CVS tag "libpcap_1_{x}rel{y}":
|
||||
cvs -d :pserver:tcpdump@cvs.tcpdump.org:/tcpdump/master checkout -r libpcap_1_{x}rel{y} libpcap
|
||||
|
||||
Please submit patches against the master copy to the libpcap project on
|
||||
sourceforge.net.
|
||||
@ -80,10 +78,10 @@ information on configuring that option.
|
||||
Note to Linux distributions and *BSD systems that include libpcap:
|
||||
|
||||
There's now a rule to make a shared library, which should work on Linux
|
||||
and *BSD (and OS X).
|
||||
and *BSD, among other platforms.
|
||||
|
||||
It sets the soname of the library to "libpcap.so.1"; this is what it
|
||||
should be, *NOT* libpcap.so.1.0 or libpcap.so.1.0.0 or something such as
|
||||
should be, *NOT* libpcap.so.1.x or libpcap.so.1.x.y or something such as
|
||||
that.
|
||||
|
||||
We've been maintaining binary compatibility between libpcap releases for
|
||||
|
@ -6,7 +6,7 @@ Important stuff (to be done before the next release)
|
||||
|
||||
General
|
||||
|
||||
- configure should not be in the CVS. Most open source projects have an
|
||||
- configure should not be in Git. Most open source projects have an
|
||||
autogen.sh script to run autoconf etc. after checkout. I think we
|
||||
should stick to the standard.
|
||||
|
||||
|
@ -1 +1 @@
|
||||
1.0.0
|
||||
1.1.1
|
||||
|
@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#) $Id: arcnet.h,v 1.2 2001/04/24 02:17:52 guy Exp $ (LBL)
|
||||
* @(#) $Id: arcnet.h,v 1.2 2001-04-24 02:17:52 guy Exp $ (LBL)
|
||||
*
|
||||
* from: NetBSD: if_arc.h,v 1.13 1999/11/19 20:41:19 thorpej Exp
|
||||
*/
|
||||
|
@ -29,7 +29,7 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @(#) $Header: /tcpdump/master/libpcap/atmuni31.h,v 1.1.6.2 2007/10/22 19:30:14 guy Exp $ (LBL)
|
||||
* @(#) $Header: /tcpdump/master/libpcap/atmuni31.h,v 1.3 2007-10-22 19:28:58 guy Exp $ (LBL)
|
||||
*/
|
||||
|
||||
/* Based on UNI3.1 standard by ATM Forum */
|
||||
|
@ -40,7 +40,7 @@
|
||||
|
||||
#if !(defined(lint) || defined(KERNEL) || defined(_KERNEL))
|
||||
static const char rcsid[] _U_ =
|
||||
"@(#) $Header: /tcpdump/master/libpcap/bpf/net/bpf_filter.c,v 1.45.2.1 2008/01/02 04:22:16 guy Exp $ (LBL)";
|
||||
"@(#) $Header: /tcpdump/master/libpcap/bpf/net/bpf_filter.c,v 1.46 2008-01-02 04:16:46 guy Exp $ (LBL)";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
@ -53,6 +53,15 @@ static const char rcsid[] _U_ =
|
||||
|
||||
#else /* WIN32 */
|
||||
|
||||
#if HAVE_INTTYPES_H
|
||||
#include <inttypes.h>
|
||||
#elif HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_BITYPES_H
|
||||
#include <sys/bitypes.h>
|
||||
#endif
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
@ -65,9 +74,9 @@ static const char rcsid[] _U_ =
|
||||
# define m_next b_cont
|
||||
# define MLEN(m) ((m)->b_wptr - (m)->b_rptr)
|
||||
# define mtod(m,t) ((t)(m)->b_rptr)
|
||||
#else
|
||||
#else /* defined(__hpux) || SOLARIS */
|
||||
# define MLEN(m) ((m)->m_len)
|
||||
#endif
|
||||
#endif /* defined(__hpux) || SOLARIS */
|
||||
|
||||
#endif /* WIN32 */
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user