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
getent networks ip is not working
#5256
Comments
|
Hi @pbrezina, if AF_UNSPEC is received we could try to parse to an IPv4 and continue if it succeed. But with regard to IPv6 support for network lookup I am not aware of any implementation supporting it, neither glibc files nor nss_ldap seems to support parsing IPv6 addresses. The POSIX man does not says anything about IPv4 / IPv6, but Linux man says that resulting netent-->n_addrtype is always AF_INET. |
If type is AF_UNSPEC try to parse to a IPv4 address. Resolves: SSSD#5256 Signed-off-by: Samuel Cabrero <scabrero@suse.de>
The address is received in host byte order, but the nss protocol parser expects it in network byte order. Resolves: SSSD#5256 Signed-off-by: Samuel Cabrero <scabrero@suse.de>
The inet_pton function returns the address in network byte order, but getnetbyaddr_r expects it in host byte order. Resolves: SSSD#5256 Signed-off-by: Samuel Cabrero <scabrero@suse.de>
Resolves: SSSD#5256 Signed-off-by: Samuel Cabrero <scabrero@suse.de>
If type is AF_UNSPEC try to parse to a IPv4 address. Resolves: SSSD#5256 Signed-off-by: Samuel Cabrero <scabrero@suse.de>
The address is received in host byte order, but the nss protocol parser expects it in network byte order. Resolves: SSSD#5256 Signed-off-by: Samuel Cabrero <scabrero@suse.de>
The inet_pton function returns the address in network byte order, but getnetbyaddr_r expects it in host byte order. Resolves: SSSD#5256 Signed-off-by: Samuel Cabrero <scabrero@suse.de>
Resolves: SSSD#5256 Signed-off-by: Samuel Cabrero <scabrero@suse.de>
The address is received in host byte order, but the nss protocol parser expects it in network byte order. Resolves: #5256 Signed-off-by: Samuel Cabrero <scabrero@suse.de> Reviewed-by: Sumit Bose <sbose@redhat.com>
The inet_pton function returns the address in network byte order, but getnetbyaddr_r expects it in host byte order. Resolves: #5256 Signed-off-by: Samuel Cabrero <scabrero@suse.de> Reviewed-by: Sumit Bose <sbose@redhat.com>
Resolves: #5256 Signed-off-by: Samuel Cabrero <scabrero@suse.de> Reviewed-by: Sumit Bose <sbose@redhat.com>
|
Pushed PR: #5297
|
#1000 introduced networks database support, however simple command
getent networks 127.100.0.0is not working. This command triggersgetnetbyaddrand fails here because address type is unspecified (AF_UNSPEC).This should be supported, at least glibc sources says so.
Also the current code does not support IPv6 which should work as well.
@scabrero Do you have any thoughts on this as the author?
The text was updated successfully, but these errors were encountered: