From 9c9e995514ab3903fa9c120f34494e328087f260 Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Wed, 30 Oct 2013 11:30:45 -0400 Subject: [PATCH 1/7] Fix errors --- src/main/dhcpd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/dhcpd.c b/src/main/dhcpd.c index ccd223e..57ff913 100644 --- a/src/main/dhcpd.c +++ b/src/main/dhcpd.c @@ -117,7 +117,7 @@ static int dhcprelay_process_client_request(REQUEST *request) /* set SRC ipaddr/port to the listener ipaddr/port */ request->packet->src_ipaddr.af = AF_INET; request->packet->src_ipaddr.ipaddr.ip4addr.s_addr = giaddrvp->vp_ipaddr; - request->packet->src_port = sock->port; + request->packet->src_port = sock->lsock.port; vp = pairfind(request->config_items, DHCP2ATTR(270)); /* DHCP-Relay-To-IP-Address */ rad_assert(vp != NULL); @@ -165,7 +165,7 @@ static int dhcprelay_process_server_reply(REQUEST *request) /* set SRC ipaddr/port to the listener ipaddr/port */ request->packet->src_ipaddr.af = AF_INET; request->packet->src_ipaddr.ipaddr.ip4addr.s_addr = giaddrvp->vp_ipaddr; - request->packet->src_port = sock->port; + request->packet->src_port = sock->lsock.port; /* set DEST ipaddr/port to clientip/68 or broadcast in specific cases */ request->packet->dst_ipaddr.af = AF_INET; @@ -530,7 +530,7 @@ static int dhcp_process(REQUEST *request) static int dhcp_socket_parse(CONF_SECTION *cs, rad_listen_t *this) { - int rcode, broadcast = 1; + int rcode; int on = 1; dhcp_socket_t *sock; RADCLIENT *client; -- 1.8.1.2