Thank you Bart. I will  check.

Regards,
Pushpa.T

On Tue, Oct 30, 2018 at 10:34 AM Bart Van Assche <bvanass...@acm.org> wrote:

> On 10/29/18 9:34 PM, Pushpa Thimmaiah wrote:
> > Thank you.  I  will verify. Does the patch works for IPv6 too?
>
> Oops, I had overlooked that your example uses an IPv6 client address.
> Can you verify whether the following (untested) patch helps (checked
> in yesterday on the v5.8 and master branches):
>
> commit 9b637efe809c490fdcaf30d1af20b4cbaef76e3e
> Author: Bart Van Assche <bvanass...@acm.org>
> Date:   Sat Oct 27 20:34:21 2018 -0700
>
>      libsnmp/transports: Fix netsnmp_udp6_transport()
>
>      Only create a transport object if parsing the client address succeeded
>      instead of creating a transport object when parsing the client address
>      failed.
>
>      Fixes: 5d8372341594 ("shared transport + udp shared domain")
>
> diff --git a/snmplib/transports/snmpUDPIPv6Domain.c
> b/snmplib/transports/snmpUDPIPv6Domain.c
> index 4d9f65eb9d19..7a3b1db15c67 100644
> --- a/snmplib/transports/snmpUDPIPv6Domain.c
> +++ b/snmplib/transports/snmpUDPIPv6Domain.c
> @@ -460,14 +460,16 @@ netsnmp_udp6_transport(const struct sockaddr_in6
> *addr, int local)
>   {
>       if (!local) {
>           const char *client_socket;
> +
>           client_socket = netsnmp_ds_get_string(NETSNMP_DS_LIBRARY_ID,
>
> NETSNMP_DS_LIB_CLIENT_ADDR);
>           if (client_socket) {
>               struct sockaddr_in6 client_addr;
> -            if(!netsnmp_sockaddr_in6_2(&client_addr, client_socket,
> NULL)) {
> -                return netsnmp_udp6_transport_with_source(addr, local,
> -                                                          &client_addr);
> -            }
> +
> +            if (!netsnmp_sockaddr_in6_2(&client_addr, client_socket,
> NULL))
> +                return NULL;
> +            return netsnmp_udp6_transport_with_source(addr, local,
> +                                                      &client_addr);
>           }
>       }
>       return netsnmp_udp6_transport_with_source(addr, local, NULL);
>
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to