components/net-snmp/patches/056.19474426.var_route.patch
author April Chin <april.chin@oracle.com>
Tue, 01 Sep 2015 09:29:08 -0700
changeset 4833 b9009ad1e605
parent 4332 feeaeac8a97c
permissions -rw-r--r--
21751260 enable system-test target for python/imaging (PIL)

This patch fixes a Solaris specific issue where ipRouteNextHop
was not returning the default ip address.The bug has been 
submitted to the community.This patch was suggested in the 
upstream, it has been included in the Net-SNMP version 5.5
onwards.

The details can be found in the following location
https://sourceforge.net/p/net-snmp/bugs/2621/

--- net-snmp-5.4.1/agent/mibgroup/mibII/var_route.c	Thu May  7 05:15:08 2015
+++ net-snmp-5.4.1/agent/mibgroup/mibII/var_route.c	Thu May  7 05:18:23 2015
@@ -759,6 +759,8 @@
         if (getMibstat(MIB_IP_ROUTE, &entry, sizeof(mib2_ipRouteEntry_t),
                        req_type, &IP_Cmp_Route, &Nextentry) != 0)
             break;
+        if(entry.ipRouteInfo.re_ire_type & IRE_BROADCAST)
+            continue;
         COPY_IPADDR(cp, (u_char *) & entry.ipRouteDest, op,
                     current + IP_ROUTEADDR_OFF);
         if (exact) {
--- net-snmp-5.4.1/agent/mibgroup/mibII/route_headers.h	Thu May 14 22:55:25 2015
+++ net-snmp-5.4.1/agent/mibgroup/mibII/route_headers.h	Thu May 14 22:54:42 2015
@@ -161,6 +161,7 @@
 
 #ifdef solaris2
 #include "kernel_sunos5.h"
+#include <inet/ip.h>
 #endif
 
 #ifdef HAVE_SYS_SYSCTL_H