mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 15:05:23 +00:00
removed the port member from dns_c_ctrl_t; the port is put in the sockaddr.
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: confctl.c,v 1.23 2000/07/07 23:11:42 brister Exp $ */
|
/* $Id: confctl.c,v 1.24 2000/07/10 11:28:30 tale Exp $ */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@@ -115,20 +115,15 @@ dns_c_ctrlinet_new(isc_mem_t *mem, dns_c_ctrl_t **control,
|
|||||||
REQUIRE(control != NULL);
|
REQUIRE(control != NULL);
|
||||||
|
|
||||||
ctrl = isc_mem_get(mem, sizeof *ctrl);
|
ctrl = isc_mem_get(mem, sizeof *ctrl);
|
||||||
if (ctrl == NULL) {
|
if (ctrl == NULL)
|
||||||
return (ISC_R_NOMEMORY);
|
return (ISC_R_NOMEMORY);
|
||||||
}
|
|
||||||
|
|
||||||
ctrl->magic = DNS_C_CONFCTL_MAGIC;
|
ctrl->magic = DNS_C_CONFCTL_MAGIC;
|
||||||
ctrl->mem = mem;
|
ctrl->mem = mem;
|
||||||
ctrl->control_type = dns_c_inet_control;
|
ctrl->control_type = dns_c_inet_control;
|
||||||
|
isc_sockaddr_setport(&addr, port);
|
||||||
ctrl->u.inet_v.addr = addr;
|
ctrl->u.inet_v.addr = addr;
|
||||||
ctrl->u.inet_v.port = port;
|
ctrl->keyidlist = keylist;
|
||||||
ctrl->keyidlist = NULL;
|
|
||||||
|
|
||||||
if (keylist != NULL) {
|
|
||||||
ctrl->keyidlist = keylist;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (copy) {
|
if (copy) {
|
||||||
res = dns_c_ipmatchlist_copy(mem,
|
res = dns_c_ipmatchlist_copy(mem,
|
||||||
@@ -235,7 +230,7 @@ dns_c_ctrl_print(FILE *fp, int indent, dns_c_ctrl_t *ctl) {
|
|||||||
(void) indent;
|
(void) indent;
|
||||||
|
|
||||||
if (ctl->control_type == dns_c_inet_control) {
|
if (ctl->control_type == dns_c_inet_control) {
|
||||||
port = ctl->u.inet_v.port;
|
port = isc_sockaddr_getport(&ctl->u.inet_v.addr);
|
||||||
iml = ctl->u.inet_v.matchlist;
|
iml = ctl->u.inet_v.matchlist;
|
||||||
|
|
||||||
fprintf(fp, "inet ");
|
fprintf(fp, "inet ");
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: confctl.h,v 1.17 2000/07/07 23:11:47 brister Exp $ */
|
/* $Id: confctl.h,v 1.18 2000/07/10 11:28:31 tale Exp $ */
|
||||||
|
|
||||||
#ifndef DNS_CONFCTL_H
|
#ifndef DNS_CONFCTL_H
|
||||||
#define DNS_CONFCTL_H 1
|
#define DNS_CONFCTL_H 1
|
||||||
@@ -86,7 +86,6 @@ struct dns_c_ctrl {
|
|||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
isc_sockaddr_t addr;
|
isc_sockaddr_t addr;
|
||||||
in_port_t port;
|
|
||||||
dns_c_ipmatchlist_t *matchlist;
|
dns_c_ipmatchlist_t *matchlist;
|
||||||
} inet_v; /* when control_type == dns_c_inet_control */
|
} inet_v; /* when control_type == dns_c_inet_control */
|
||||||
struct {
|
struct {
|
||||||
|
Reference in New Issue
Block a user