mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-28 21:07:43 +00:00
[master] Added includes of new BIND9 compatibility headers, updated util/bind.sh
Merges in rt48072.
This commit is contained in:
parent
b1ed27b951
commit
8194daabfd
@ -48,6 +48,9 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
|
|
||||||
|
#include <isc/boolean.h>
|
||||||
|
#include <isc/int.h>
|
||||||
|
|
||||||
#include <isc/buffer.h>
|
#include <isc/buffer.h>
|
||||||
#include <isc/lex.h>
|
#include <isc/lex.h>
|
||||||
#include <isc/lib.h>
|
#include <isc/lib.h>
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#ifndef DHCP_RESULT_H
|
#ifndef DHCP_RESULT_H
|
||||||
#define DHCP_RESULT_H 1
|
#define DHCP_RESULT_H 1
|
||||||
|
|
||||||
|
#include <isc/boolean.h>
|
||||||
#include <isc/lang.h>
|
#include <isc/lang.h>
|
||||||
#include <isc/resultclass.h>
|
#include <isc/resultclass.h>
|
||||||
#include <isc/types.h>
|
#include <isc/types.h>
|
||||||
|
@ -1034,7 +1034,8 @@ void check_pool6_threshold(struct reply_state *reply,
|
|||||||
shared_name,
|
shared_name,
|
||||||
inet_ntop(AF_INET6, &lease->addr,
|
inet_ntop(AF_INET6, &lease->addr,
|
||||||
tmp_addr, sizeof(tmp_addr)),
|
tmp_addr, sizeof(tmp_addr)),
|
||||||
used, count);
|
(long long unsigned)(used),
|
||||||
|
(long long unsigned)(count));
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1066,7 +1067,8 @@ void check_pool6_threshold(struct reply_state *reply,
|
|||||||
"address: %s; high threshold %d%% %llu/%llu.",
|
"address: %s; high threshold %d%% %llu/%llu.",
|
||||||
shared_name,
|
shared_name,
|
||||||
inet_ntop(AF_INET6, &lease->addr, tmp_addr, sizeof(tmp_addr)),
|
inet_ntop(AF_INET6, &lease->addr, tmp_addr, sizeof(tmp_addr)),
|
||||||
poolhigh, used, count);
|
poolhigh, (long long unsigned)(used),
|
||||||
|
(long long unsigned)(count));
|
||||||
|
|
||||||
/* handle the low threshold now, if we don't
|
/* handle the low threshold now, if we don't
|
||||||
* have one we default to 0. */
|
* have one we default to 0. */
|
||||||
@ -1436,12 +1438,15 @@ pick_v6_address(struct reply_state *reply)
|
|||||||
log_debug("Unable to pick client address: "
|
log_debug("Unable to pick client address: "
|
||||||
"no addresses available - shared network %s: "
|
"no addresses available - shared network %s: "
|
||||||
" 2^64-1 < total, %llu active, %llu abandoned",
|
" 2^64-1 < total, %llu active, %llu abandoned",
|
||||||
shared_name, active - abandoned, abandoned);
|
shared_name, (long long unsigned)(active - abandoned),
|
||||||
|
(long long unsigned)(abandoned));
|
||||||
} else {
|
} else {
|
||||||
log_debug("Unable to pick client address: "
|
log_debug("Unable to pick client address: "
|
||||||
"no addresses available - shared network %s: "
|
"no addresses available - shared network %s: "
|
||||||
"%llu total, %llu active, %llu abandoned",
|
"%llu total, %llu active, %llu abandoned",
|
||||||
shared_name, total, active - abandoned, abandoned);
|
shared_name, (long long unsigned)(total),
|
||||||
|
(long long unsigned)(active - abandoned),
|
||||||
|
(long long unsigned)(abandoned));
|
||||||
}
|
}
|
||||||
|
|
||||||
return ISC_R_NORESOURCES;
|
return ISC_R_NORESOURCES;
|
||||||
|
34
util/bind.sh
34
util/bind.sh
@ -27,11 +27,20 @@
|
|||||||
|
|
||||||
topdir=`pwd`
|
topdir=`pwd`
|
||||||
binddir=$topdir/bind
|
binddir=$topdir/bind
|
||||||
remote=--remote=repo.isc.org:/proj/git/prod/bind9.git
|
|
||||||
|
# repo_host and repo_path are used together to from urls for wget calls
|
||||||
|
# to fetch the version and kit.sh files, and then also as the --remote
|
||||||
|
# argument passed into kit.sh
|
||||||
|
repo_host="gitlab.isc.org"
|
||||||
|
repo_path="isc-projects/bind9"
|
||||||
|
|
||||||
case "${1:-}" in
|
case "${1:-}" in
|
||||||
--remote=*)
|
--repo_host=*)
|
||||||
remote="${1}";
|
repo_host="${1}";
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--repo_path=*)
|
||||||
|
repo_path="${1}";
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@ -95,7 +104,7 @@ case $# in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
*) echo "usage: sh bind.sh [--remote=<path>] [<branch>|<version>]" >&2
|
*) echo "usage: sh bind.sh [--repo_host=<host>] [--repo_path=<project path>] [<branch>|<version>]" >&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@ -119,18 +128,27 @@ else
|
|||||||
cd $binddir
|
cd $binddir
|
||||||
|
|
||||||
# Get the bind version file and move it to version.tmp
|
# Get the bind version file and move it to version.tmp
|
||||||
git archive --format tar $remote $BINDTAG version | tar xf -
|
wget https://$repo_host/$repo_path/raw/$BINDTAG/version
|
||||||
mv version version.tmp
|
mv version version.tmp
|
||||||
|
if [ $? -ne 0 ]
|
||||||
|
then
|
||||||
|
echo "Fetch of version file failed"
|
||||||
|
exit -1
|
||||||
|
fi
|
||||||
|
|
||||||
# Get the bind release kit shell script
|
# Get the bind release kit shell script
|
||||||
git archive --format tar $remote master:util/ | tar xf - kit.sh
|
wget https://$repo_host/$repo_path/raw/master/util/kit.sh
|
||||||
|
if [ $? -ne 0 ]
|
||||||
|
then
|
||||||
|
echo "Fetch of kit.sh failed"
|
||||||
|
exit -1
|
||||||
|
fi
|
||||||
|
|
||||||
# Create the bind tarball, which has the side effect of
|
# Create the bind tarball, which has the side effect of
|
||||||
# setting up the bind directory we will use for building
|
# setting up the bind directory we will use for building
|
||||||
# the libraries
|
# the libraries
|
||||||
echo Creating tarball for $BINDTAG
|
echo Creating tarball for $BINDTAG
|
||||||
sh kit.sh $remote $SNAP $BINDTAG $binddir
|
sh kit.sh --remote="git@$repo_host:$repo_path.git" $SNAP $BINDTAG $binddir
|
||||||
|
|
||||||
. ./version.tmp
|
. ./version.tmp
|
||||||
|
|
||||||
version=${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}
|
version=${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user