diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2004-12-06 13:51:17 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2004-12-06 13:51:17 +0000 |
commit | 5fddc1cb91eccff537debd39f04201f34e116d20 (patch) | |
tree | c69153a05c5635335f4b1bf5798de5ca67ea5db1 /usr.sbin/dhcpd | |
parent | a20df811f278b976b3bed1536174b9e0179216be (diff) |
Set correct source address for relayed packets. This affects only setups that
use 'next-server' config option. From Hans Kremers. OK henning@
Diffstat (limited to 'usr.sbin/dhcpd')
-rw-r--r-- | usr.sbin/dhcpd/dhcp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/dhcpd/dhcp.c b/usr.sbin/dhcpd/dhcp.c index 4c2b14ed211..b6ecd376718 100644 --- a/usr.sbin/dhcpd/dhcp.c +++ b/usr.sbin/dhcpd/dhcp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhcp.c,v 1.14 2004/09/16 18:35:42 deraadt Exp $ */ +/* $OpenBSD: dhcp.c,v 1.15 2004/12/06 13:51:16 claudio Exp $ */ /* * Copyright (c) 1995, 1996, 1997, 1998, 1999 @@ -1215,8 +1215,10 @@ dhcp_reply(struct lease *lease) to.sin_addr = raw.giaddr; to.sin_port = server_port; + memcpy(&from, state->from.iabuf, sizeof from); + (void) send_packet(state->ip, &raw, - packet_length, raw.siaddr, &to, &state->haddr); + packet_length, form, &to, &state->haddr); free_lease_state(state, "dhcp_reply gateway"); lease->state = NULL; |