Fix DHCP relay, broken by ff325644c7afae2588583f935f4ea9b9694eb52e
Thanks to John Fitzgibbon for initial patch.
diff --git a/src/dhcp.c b/src/dhcp.c
index e3509a6..4a2983e 100644
--- a/src/dhcp.c
+++ b/src/dhcp.c
@@ -273,8 +273,8 @@
if ((relay = relay_reply4((struct dhcp_packet *)daemon->dhcp_packet.iov_base, ifr.ifr_name)))
{
/* Reply from server, using us as relay. */
- iface_index = relay->iface_index;
- if (!indextoname(daemon->dhcpfd, iface_index, ifr.ifr_name))
+ rcvd_iface_index = relay->iface_index;
+ if (!indextoname(daemon->dhcpfd, rcvd_iface_index, ifr.ifr_name))
return;
is_relay_reply = 1;
iov.iov_len = sz;