~ubuntu-branches/ubuntu/trusty/net-snmp/trusty

« back to all changes in this revision

Viewing changes to agent/mibgroup/ip-forward-mib/data_access/route_linux.c

  • Committer: Bazaar Package Importer
  • Author(s): Steve Kowalik
  • Date: 2007-12-08 14:59:50 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20071208145950-u1tykhpw56nyzqik
Tags: 5.4.1~dfsg-4ubuntu1
* Merge from debian unstable.
* Remaining Ubuntu changes:
  - Remove stop links from rc0 and rc6
  - Munge Maintainer field as per spec.
* Ubuntu changes dropped:
  - Symlink common files between the packages, CDBS ought to handle that
    for us automatically.
* The latest Debian changes has dropped history from the changelog. Slot in
  the Ubuntu changes as best I can. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 *  Interface MIB architecture support
3
3
 *
4
 
 * $Id: route_linux.c,v 1.13 2005/11/17 16:06:25 rstory Exp $
 
4
 * $Id: route_linux.c 16381 2007-05-17 21:53:28Z hardaker $
5
5
 */
6
6
#include <net-snmp/net-snmp-config.h>
7
7
#include <net-snmp/net-snmp-includes.h>
95
95
            snmp_log(LOG_ERR,
96
96
                     "/proc/net/route data format error (%d!=8), line ==|%s|",
97
97
                     rc, line);
 
98
            
 
99
            netsnmp_access_route_entry_free(entry);        
98
100
            continue;
99
101
        }
100
102
 
182
184
        /*
183
185
         * insert into container
184
186
         */
185
 
        CONTAINER_INSERT(container, entry);
 
187
        if (CONTAINER_INSERT(container, entry) < 0)
 
188
        {
 
189
            DEBUGMSGTL(("access:route:container", "error with route_entry: insert into container failed.\n"));
 
190
            netsnmp_access_route_entry_free(entry);
 
191
            continue;
 
192
        }
186
193
    }
187
194
 
188
195
    fclose(in);
190
197
    return 0;
191
198
}
192
199
 
193
 
#ifdef INET6
 
200
#ifdef NETSNMP_ENABLE_IPV6
194
201
static int
195
202
_load_ipv6(netsnmp_container* container, u_long *index )
196
203
{
365
372
 
366
373
    rc = _load_ipv4(container, &count);
367
374
    
368
 
#ifdef INET6
 
375
#ifdef NETSNMP_ENABLE_IPV6
369
376
    if((0 != rc) || (load_flags & NETSNMP_ACCESS_ROUTE_LOAD_IPV4_ONLY))
370
377
        return rc;
371
378