Update validation related codes to security v2
Change-Id: I5467b87092820666c04f22623f0f1665ce9a1194
diff --git a/src/clients/query.cpp b/src/clients/query.cpp
index 9853672..8a133bb 100644
--- a/src/clients/query.cpp
+++ b/src/clients/query.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2016, Regents of the University of California.
+/*
+ * Copyright (c) 2014-2017, Regents of the University of California.
*
* This file is part of NDNS (Named Data Networking Domain Name Service).
* See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -47,10 +47,11 @@
m_zone = zone;
- if (interest.hasLink()) {
- m_link = interest.getLink().wireEncode();
- } else {
- m_link = Block();
+ if (!interest.getForwardingHint().empty()) {
+ m_delegationList = interest.getForwardingHint();
+ }
+ else {
+ m_delegationList = DelegationList();
}
@@ -74,13 +75,19 @@
Interest interest;
interest.setName(name);
interest.setInterestLifetime(m_interestLifetime);
- if (m_link.hasWire()) {
- interest.setLink(m_link);
+ if (!m_delegationList.empty()) {
+ interest.setForwardingHint(m_delegationList);
}
return interest;
}
+void
+Query::setDelegationListFromLink(const Link& link)
+{
+ m_delegationList = link.getDelegationList();
+}
+
std::ostream&
operator<<(std::ostream& os, const Query& query)
{