aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIstvan Ruzman <istvan@ruzman.eu>2019-12-17 12:23:57 +0100
committerIstvan Ruzman <istvan@ruzman.eu>2019-12-17 12:23:57 +0100
commit2bd8d87ff36bf8c51ebef1d38eef471c1cc61814 (patch)
tree6f31e527daf3849d9a99c6e8f19280e57f03758a
parent09e5061aa36544056d18aab5b2d5af8ada755ffb (diff)
Fix: the host uniq tag must be present only once
-rw-r--r--src/header.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/header.rs b/src/header.rs
index 721d2c0..326032e 100644
--- a/src/header.rs
+++ b/src/header.rs
@@ -91,6 +91,7 @@ impl<'a> Header<'a> {
// these tags must only exists once
let mut service_name = false;
+ let mut host_uniq = false;
let mut ac_name = false;
let mut relay_session_id = false;
let mut ppp_max_payload = false;
@@ -117,6 +118,7 @@ impl<'a> Header<'a> {
tag::TAG_SERVICE_NAME => Self::check_duplicate(tag, &mut service_name)?,
tag::TAG_AC_NAME => Self::check_duplicate(tag, &mut ac_name)?,
tag::TAG_AC_COOKIE => Self::check_duplicate(tag, &mut ac_cookie)?,
+ tag::TAG_HOST_UNIQ => Self::check_duplicate(tag, &mut host_uniq)?,
tag::TAG_RELAY_SESSION_ID => {
Self::check_duplicate(tag, &mut relay_session_id)?
}