Bug 1673272

Summary: IPv6 address from clientaddr option is not assigned
Product: [Fedora] Fedora Reporter: Josef Ridky <jridky>
Component: net-snmpAssignee: Josef Ridky <jridky>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jridky, jsafrane
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: net-snmp-5.8-6.fc29 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-12 02:55:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Josef Ridky 2019-02-07 08:08:33 UTC
Description of problem:
In IPv6, snmp trap packet does not send from specified interface assigned by clientaddr option in snmp.conf

Version-Release number of selected component (if applicable):
net-snmp-5.8-6.el8

How reproducible:
Always

Steps to Reproduce:
1. Prepare two nics for the server.
2. Assign IPv6 address to two NICs.
3. Assigned clientaddr to /etc/snmp/snmp.conf
~~~
clientaddr 2001:db4::101
~~~
4. Send snmp trap to another server.
5. Check source address in the packet.

Actual results:
The source address is not the assigned address.

Expected results:
The source address is the assigned address in clientaddr option.

Additional info:
Wrong condition in file snmplib/transports/snmpUDPIPv6Domain.c function netsnmp_udp6_transport:
if(!netsnmp_sockaddr_in6_2(&client_addr, client_socket, NULL))

because netsnmp_sockaddr_in6_2 function returns 0 if an error and 1 if successfully resolved as we can see in snmplib/transports/snmpIPv6BaseDomain.c

Comment 1 Fedora Update System 2019-02-07 11:14:53 UTC
net-snmp-5.8-6.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-3ae06fb0a4

Comment 2 Fedora Update System 2019-02-10 04:27:39 UTC
net-snmp-5.8-6.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-3ae06fb0a4

Comment 3 Fedora Update System 2019-02-12 02:55:50 UTC
net-snmp-5.8-6.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.