Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify the representation of IP addresses in Tempesta #775

Closed
keshonok opened this issue Jul 26, 2017 · 3 comments
Closed

Unify the representation of IP addresses in Tempesta #775

keshonok opened this issue Jul 26, 2017 · 3 comments
Assignees
Milestone

Comments

@keshonok
Copy link
Contributor

IP addresses can be specified in the configuration either in IPv4 or in IPv6 format. In addition, in some cases they may be specified in CIDR format. The addresses are stored in Tempesta, and in some cases they are stored in Tempesta in the same format they are specified, and in some cases they are converted to IPv6. The lack of unification may lead to bugs when comparing addresses. For unification, all addresses should be converted to IPv6 representation internally in Tempesta.

There's one thing however. Sometimes addresses are printed in log messages. It's highly desirable that they are printed in the same form they are specified in configuration. That way the addresses can be visually recognized and matched by a human operator and/or system administrator.

@krizhanovsky
Copy link
Contributor

There is agreement that Tempesta works with IPv6 addresses only and all IPv4 addresses are converted to IPv6 (IPv4-mapped IPv6 addresses), e.g. we call ipv6_addr_set_v4mapped() from tfw_addr_pton_addr() for IPv4 addresses. @keshonok do you mean that no all IPv4 addresses are converted to IPv6 in internal Tempesta's operations?

At least logging must be fixed. For example Frang limits generate records like

    Warning: frang: Content-Type header field for ::ffff:c0a8:6401 is missed

for IPv4 clients and the records are very cryptic for a user.

@krizhanovsky krizhanovsky modified the milestones: backlog, 0.6 KTLS, 0.7 HTTP/2 Jan 9, 2018
@krizhanovsky
Copy link
Contributor

In short it seems that we just need properly write IPv6-mapped IPv4 addresses to log, this should fix the issue.

@i-rinat
Copy link
Contributor

i-rinat commented Oct 19, 2018

Implemented in #1081.

@i-rinat i-rinat closed this as completed Oct 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants