mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-09-03 07:45:20 +00:00
fix up char declarations; don't dump packets unless DEBUG_PACKET defined
This commit is contained in:
10
dhcp.c
10
dhcp.c
@@ -47,7 +47,7 @@ static char copyright[] =
|
|||||||
|
|
||||||
#include "dhcpd.h"
|
#include "dhcpd.h"
|
||||||
|
|
||||||
static char dhcp_message [256];
|
static unsigned char dhcp_message [256];
|
||||||
|
|
||||||
void dhcp (packet)
|
void dhcp (packet)
|
||||||
struct packet *packet;
|
struct packet *packet;
|
||||||
@@ -319,7 +319,7 @@ void nak_lease (packet, cip)
|
|||||||
if (result < 0)
|
if (result < 0)
|
||||||
warn ("sendpkt: %m");
|
warn ("sendpkt: %m");
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG_PACKET
|
||||||
dump_packet (packet);
|
dump_packet (packet);
|
||||||
dump_raw ((unsigned char *)packet -> raw, packet -> packet_length);
|
dump_raw ((unsigned char *)packet -> raw, packet -> packet_length);
|
||||||
dump_packet (&outgoing);
|
dump_packet (&outgoing);
|
||||||
@@ -508,7 +508,7 @@ void ack_lease (packet, lease, offer, when)
|
|||||||
if (vendor_class) {
|
if (vendor_class) {
|
||||||
options [DHO_DHCP_CLASS_IDENTIFIER] = &vendor_class_tree;
|
options [DHO_DHCP_CLASS_IDENTIFIER] = &vendor_class_tree;
|
||||||
options [DHO_DHCP_CLASS_IDENTIFIER] -> value =
|
options [DHO_DHCP_CLASS_IDENTIFIER] -> value =
|
||||||
vendor_class -> name;
|
(unsigned char *)vendor_class -> name;
|
||||||
options [DHO_DHCP_CLASS_IDENTIFIER] -> len =
|
options [DHO_DHCP_CLASS_IDENTIFIER] -> len =
|
||||||
strlen (vendor_class -> name);
|
strlen (vendor_class -> name);
|
||||||
options [DHO_DHCP_CLASS_IDENTIFIER] -> buf_size =
|
options [DHO_DHCP_CLASS_IDENTIFIER] -> buf_size =
|
||||||
@@ -522,7 +522,7 @@ void ack_lease (packet, lease, offer, when)
|
|||||||
if (user_class) {
|
if (user_class) {
|
||||||
options [DHO_DHCP_USER_CLASS_ID] = &user_class_tree;
|
options [DHO_DHCP_USER_CLASS_ID] = &user_class_tree;
|
||||||
options [DHO_DHCP_USER_CLASS_ID] -> value =
|
options [DHO_DHCP_USER_CLASS_ID] -> value =
|
||||||
user_class -> name;
|
(unsigned char *)user_class -> name;
|
||||||
options [DHO_DHCP_USER_CLASS_ID] -> len =
|
options [DHO_DHCP_USER_CLASS_ID] -> len =
|
||||||
strlen (user_class -> name);
|
strlen (user_class -> name);
|
||||||
options [DHO_DHCP_USER_CLASS_ID] -> buf_size =
|
options [DHO_DHCP_USER_CLASS_ID] -> buf_size =
|
||||||
@@ -604,7 +604,7 @@ void ack_lease (packet, lease, offer, when)
|
|||||||
if (result < 0)
|
if (result < 0)
|
||||||
warn ("sendpkt: %m");
|
warn ("sendpkt: %m");
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG_PACKET
|
||||||
dump_packet (packet);
|
dump_packet (packet);
|
||||||
dump_raw ((unsigned char *)packet -> raw, packet -> packet_length);
|
dump_raw ((unsigned char *)packet -> raw, packet -> packet_length);
|
||||||
dump_packet (&outgoing);
|
dump_packet (&outgoing);
|
||||||
|
@@ -47,7 +47,7 @@ static char copyright[] =
|
|||||||
|
|
||||||
#include "dhcpd.h"
|
#include "dhcpd.h"
|
||||||
|
|
||||||
static char dhcp_message [256];
|
static unsigned char dhcp_message [256];
|
||||||
|
|
||||||
void dhcp (packet)
|
void dhcp (packet)
|
||||||
struct packet *packet;
|
struct packet *packet;
|
||||||
@@ -319,7 +319,7 @@ void nak_lease (packet, cip)
|
|||||||
if (result < 0)
|
if (result < 0)
|
||||||
warn ("sendpkt: %m");
|
warn ("sendpkt: %m");
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG_PACKET
|
||||||
dump_packet (packet);
|
dump_packet (packet);
|
||||||
dump_raw ((unsigned char *)packet -> raw, packet -> packet_length);
|
dump_raw ((unsigned char *)packet -> raw, packet -> packet_length);
|
||||||
dump_packet (&outgoing);
|
dump_packet (&outgoing);
|
||||||
@@ -508,7 +508,7 @@ void ack_lease (packet, lease, offer, when)
|
|||||||
if (vendor_class) {
|
if (vendor_class) {
|
||||||
options [DHO_DHCP_CLASS_IDENTIFIER] = &vendor_class_tree;
|
options [DHO_DHCP_CLASS_IDENTIFIER] = &vendor_class_tree;
|
||||||
options [DHO_DHCP_CLASS_IDENTIFIER] -> value =
|
options [DHO_DHCP_CLASS_IDENTIFIER] -> value =
|
||||||
vendor_class -> name;
|
(unsigned char *)vendor_class -> name;
|
||||||
options [DHO_DHCP_CLASS_IDENTIFIER] -> len =
|
options [DHO_DHCP_CLASS_IDENTIFIER] -> len =
|
||||||
strlen (vendor_class -> name);
|
strlen (vendor_class -> name);
|
||||||
options [DHO_DHCP_CLASS_IDENTIFIER] -> buf_size =
|
options [DHO_DHCP_CLASS_IDENTIFIER] -> buf_size =
|
||||||
@@ -522,7 +522,7 @@ void ack_lease (packet, lease, offer, when)
|
|||||||
if (user_class) {
|
if (user_class) {
|
||||||
options [DHO_DHCP_USER_CLASS_ID] = &user_class_tree;
|
options [DHO_DHCP_USER_CLASS_ID] = &user_class_tree;
|
||||||
options [DHO_DHCP_USER_CLASS_ID] -> value =
|
options [DHO_DHCP_USER_CLASS_ID] -> value =
|
||||||
user_class -> name;
|
(unsigned char *)user_class -> name;
|
||||||
options [DHO_DHCP_USER_CLASS_ID] -> len =
|
options [DHO_DHCP_USER_CLASS_ID] -> len =
|
||||||
strlen (user_class -> name);
|
strlen (user_class -> name);
|
||||||
options [DHO_DHCP_USER_CLASS_ID] -> buf_size =
|
options [DHO_DHCP_USER_CLASS_ID] -> buf_size =
|
||||||
@@ -604,7 +604,7 @@ void ack_lease (packet, lease, offer, when)
|
|||||||
if (result < 0)
|
if (result < 0)
|
||||||
warn ("sendpkt: %m");
|
warn ("sendpkt: %m");
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG_PACKET
|
||||||
dump_packet (packet);
|
dump_packet (packet);
|
||||||
dump_raw ((unsigned char *)packet -> raw, packet -> packet_length);
|
dump_raw ((unsigned char *)packet -> raw, packet -> packet_length);
|
||||||
dump_packet (&outgoing);
|
dump_packet (&outgoing);
|
||||||
|
Reference in New Issue
Block a user