Fix the OPT Len() function

This commit is contained in:
Miek Gieben 2012-01-12 20:16:00 +01:00
parent d53102fc7b
commit 2829cf1c01
1 changed files with 4 additions and 1 deletions

View File

@ -76,7 +76,10 @@ func (rr *RR_OPT) String() string {
}
func (rr *RR_OPT) Len() int {
return rr.Hdr.Len() + len(rr.Option) // TODO: to small/large?
l := rr.Hdr.Len()
for i := 0; i < len(rr.Option); i++ {
l += 2 + len(rr.Option[i].Data)/2
}
}
// TODO(mg)