Commit b5ce1263 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Remove unused parameter from dhcpv4_send.

We were using the global value, not the one passed in parameter.
parent a1e1d768
...@@ -283,7 +283,7 @@ dhcpv4_parse(unsigned char *buf, int buflen, ...@@ -283,7 +283,7 @@ dhcpv4_parse(unsigned char *buf, int buflen,
#define LONG(_v) DO_HTONL(buf + i, (_v)); i += 4 #define LONG(_v) DO_HTONL(buf + i, (_v)); i += 4
static int static int
dhcpv4_send(int s, struct sockaddr_in *to, int dontroute, dhcpv4_send(struct sockaddr_in *to, int dontroute,
int type, const unsigned char *xid, int type, const unsigned char *xid,
const unsigned char *chaddr, const unsigned char *myaddr, const unsigned char *chaddr, const unsigned char *myaddr,
const unsigned char *ip, struct interface *interface, const unsigned char *ip, struct interface *interface,
...@@ -519,7 +519,7 @@ dhcpv4_receive() ...@@ -519,7 +519,7 @@ dhcpv4_receive()
if(remain < 60) if(remain < 60)
goto nak; goto nak;
rc = dhcpv4_send(dhcpv4_socket, &to, dontroute, rc = dhcpv4_send(&to, dontroute,
req.type == 1 ? 2 : 5, req.xid, req.chaddr, myaddr, req.type == 1 ? 2 : 5, req.xid, req.chaddr, myaddr,
addr, interface, netmask, remain); addr, interface, netmask, remain);
if(rc < 0) if(rc < 0)
...@@ -533,7 +533,7 @@ dhcpv4_receive() ...@@ -533,7 +533,7 @@ dhcpv4_receive()
fprintf(stderr, "Received DHCPRELEASE"); fprintf(stderr, "Received DHCPRELEASE");
break; break;
case 8: /* DHCPINFORM */ case 8: /* DHCPINFORM */
rc = dhcpv4_send(dhcpv4_socket, &to, dontroute, rc = dhcpv4_send(&to, dontroute,
5, req.xid, req.chaddr, myaddr, 5, req.xid, req.chaddr, myaddr,
NULL, interface, NULL, 0); NULL, interface, NULL, 0);
if(rc < 0) if(rc < 0)
...@@ -548,7 +548,7 @@ dhcpv4_receive() ...@@ -548,7 +548,7 @@ dhcpv4_receive()
if(memcmp(req.giaddr, zeroes, 4) == 0) if(memcmp(req.giaddr, zeroes, 4) == 0)
memcpy(&to.sin_addr, broadcast_addr, 4); memcpy(&to.sin_addr, broadcast_addr, 4);
if(req.type == 3) if(req.type == 3)
dhcpv4_send(dhcpv4_socket, &to, dontroute, 6, req.xid, req.chaddr, dhcpv4_send(&to, dontroute, 6, req.xid, req.chaddr,
myaddr, req.ip, interface, NULL, 0); myaddr, req.ip, interface, NULL, 0);
done: done:
free(req.cid); free(req.cid);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment