parser: fix detected IPv4 and IPv6 byte order
Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
parent
848979950c
commit
bdb266f039
@ -2457,6 +2457,7 @@ namespace stdex
|
|||||||
if (i < 4)
|
if (i < 4)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
value.s_addr = htonl(value.s_addr);
|
||||||
this->interval.start = start;
|
this->interval.start = start;
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
@ -2720,7 +2721,7 @@ namespace stdex
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
components[i].end = this->interval.end;
|
components[i].end = this->interval.end;
|
||||||
this->value.s6_words[i] = (uint16_t)x;
|
this->value.s6_words[i] = htons((uint16_t)x);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (compaction_i != SIZE_MAX) {
|
if (compaction_i != SIZE_MAX) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user