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?
diff --git a/src/dhcp6.c b/src/dhcp6.c
index 45a9bfd..6c27f4b 100644
--- a/src/dhcp6.c
+++ b/src/dhcp6.c
@@ -222,7 +222,7 @@
   lease_update_dns();
   
   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());
 }
 
diff --git a/src/rfc3315.c b/src/rfc3315.c
index 4a39e2b..ed76b24 100644
--- a/src/rfc3315.c
+++ b/src/rfc3315.c
@@ -682,14 +682,17 @@
 				  lease_add_extradata(lease, NULL, 0, 0);
 				else
 				  {
-				    struct dhcp_netid *n, *l;
+				    struct dhcp_netid *n, *l, *tmp = tags;
 				    
 				    /* link temporarily */
 				    for (n = context_tags; n && n->next; n = n->next);
 				    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;
 					/* kill dupes */