Commit 1bacf6bc authored by gauthier's avatar gauthier

bug imsi to imsi64 conversion

parent 496955d9
......@@ -425,9 +425,9 @@ struct imsi_s {
{
imsi64_t imsi64 = 0;
for (int i=0; i < IMSI_BCD8_SIZE; i++) {
uint8_t d2 = u1.b[i];
uint8_t d1 = (d2 & 0xf0) >> 4;
d2 = d2 & 0x0f;
uint8_t d1 = u1.b[i];
uint8_t d2 = (d1 & 0xf0) >> 4;
d1 = d1 & 0x0f;
if (10 > d1) {
imsi64 = imsi64*10 + d1;
if (10 > d2) {
......@@ -1263,6 +1263,19 @@ struct fully_qualified_tunnel_endpoint_identifier_s {
struct in_addr ipv4_address;
struct in6_addr ipv6_address;
bool operator<(const struct fully_qualified_tunnel_endpoint_identifier_s& f) const
{
return (teid_gre_key < f.teid_gre_key) or
(ipv4_address.s_addr < f.ipv4_address.s_addr) or
(interface_type < f.interface_type) or
(v4 == f.v4) or
(v6 == f.v6) or
(ipv6_address.s6_addr32[0] == f.ipv6_address.s6_addr32[0]) or
(ipv6_address.s6_addr32[1] == f.ipv6_address.s6_addr32[1]) or
(ipv6_address.s6_addr32[2] == f.ipv6_address.s6_addr32[2]) or
(ipv6_address.s6_addr32[3] == f.ipv6_address.s6_addr32[3]);
}
bool operator==(const struct fully_qualified_tunnel_endpoint_identifier_s& f) const
{
return (teid_gre_key == f.teid_gre_key) and
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment