Commit 87b8ecb1 authored by Simon Kelley's avatar Simon Kelley Committed by Simon Kelley

Fixed code passing tags to helper to work when there are no context tags.

Fixed call to sendto() in dhcp6.c. How did it every work before?
parent e44ddcac
...@@ -222,7 +222,7 @@ void dhcp6_packet(time_t now) ...@@ -222,7 +222,7 @@ void dhcp6_packet(time_t now)
lease_update_dns(); lease_update_dns();
if (sz != 0) if (sz != 0)
while (sendto(daemon->dhcp6fd, daemon->outpacket.iov_base, sz, 0, (struct sockaddr *)&from, sizeof(from)) && while (sendto(daemon->dhcp6fd, daemon->outpacket.iov_base, sz, 0, (struct sockaddr *)&from, sizeof(from)) == -1 &&
retry_send()); retry_send());
} }
......
...@@ -682,14 +682,17 @@ static int dhcp6_no_relay(int msg_type, struct in6_addr *link_address, struct dh ...@@ -682,14 +682,17 @@ static int dhcp6_no_relay(int msg_type, struct in6_addr *link_address, struct dh
lease_add_extradata(lease, NULL, 0, 0); lease_add_extradata(lease, NULL, 0, 0);
else else
{ {
struct dhcp_netid *n, *l; struct dhcp_netid *n, *l, *tmp = tags;
/* link temporarily */ /* link temporarily */
for (n = context_tags; n && n->next; n = n->next); for (n = context_tags; n && n->next; n = n->next);
if ((l = n)) if ((l = n))
l->next = tags; {
l->next = tags;
tmp = context_tags;
}
for (n = run_tag_if(context_tags); n; n = n->next) for (n = run_tag_if(tmp); n; n = n->next)
{ {
struct dhcp_netid *n1; struct dhcp_netid *n1;
/* kill dupes */ /* kill dupes */
......
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