From: tho Date: Wed, 21 Jul 2010 16:43:39 +0000 (+0000) Subject: Packets/DefaultBundle: hotfix for IPv6 Pad1 alignment options in ListOptionTypeParser... X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=225f601ae7b61c510ccd9596e80aa6cf9cc7cbbe;p=senf.git Packets/DefaultBundle: hotfix for IPv6 Pad1 alignment options in ListOptionTypeParser_Policy; needs to be rewritten!! git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1646 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/senf/Packets/DefaultBundle/ListOptionTypeParser.cti b/senf/Packets/DefaultBundle/ListOptionTypeParser.cti index 81266cf..148ec5d 100644 --- a/senf/Packets/DefaultBundle/ListOptionTypeParser.cti +++ b/senf/Packets/DefaultBundle/ListOptionTypeParser.cti @@ -108,7 +108,11 @@ construct(container_type & c) realAux_ = (AuxPolicy::aux(i, c.state()) * 8) + 6; safe_data_iterator e = i + realAux_; for (n_ = 0; i != e;) { - unsigned int elByte = senf::bytes(ElementParser(i, c.state())); + size_type elByte; + if (i[0] == 0u) + elByte = 1; + else + elByte = senf::bytes(ElementParser(i, c.state())); if (((i + elByte) == e) && (i[0] == 0u || i[0] == 1u)) { //check weather last element is padding or not realAux_ -= std::distance(i, e); c.data().erase(i, e); //delete padding