diff options
author | vincent <vincent> | 2005-09-29 15:52:57 +0200 |
---|---|---|
committer | vincent <vincent> | 2005-09-29 15:52:57 +0200 |
commit | ba682537715c42ab3976790baea5cda86c5b1589 (patch) | |
tree | 791c998f0857bc4a53761e571427a6acdd11f4ae /ospfd/ospf_snmp.c | |
parent | 2005-09-29 Alain Ritoux <alain.ritoux@6wind.com> (diff) | |
download | frr-ba682537715c42ab3976790baea5cda86c5b1589.tar.xz frr-ba682537715c42ab3976790baea5cda86c5b1589.zip |
2005-09-29 Alain Ritoux <alain.ritoux@6wind.com>
* ospfd/ospf_vty.c: forece default route LSA to be re_issued whenever
cost is changed ( [no] ip ospf area XXX default-cost YYY)
Support ignore-mtu option
* ospfd/ospfd.h: define OSPF_MTU_IGNORE_DEFAULT
* ospfd/ospf_packet.c: support ignore-mtu option
* ospfd/ospf_interface.h: field added for skipping MTU check
* ospfd/ospf_interface.c: fix memory leak in ospf_crypt_key_delete()
Set mtu_ignore field to default value
* ospfd/ospf_abr.[ch]: export ospf_abr_announce_network_to_area()
* ospfd/ospf_ism.h: add MACRO to convert internal ISM status into SNMP
correct values
* ospfd/ospf_snmp.c: add sanity check on LSA type in lsdb_lookup_next()
convert OSPFIFSTATE internal status into SNMP values
Diffstat (limited to 'ospfd/ospf_snmp.c')
-rw-r--r-- | ospfd/ospf_snmp.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ospfd/ospf_snmp.c b/ospfd/ospf_snmp.c index 4ed1fab89..d0c129072 100644 --- a/ospfd/ospf_snmp.c +++ b/ospfd/ospf_snmp.c @@ -1,4 +1,5 @@ /* OSPFv2 SNMP support + * Copyright (C) 2005 6WIND <alain.ritoux@6wind.com> * Copyright (C) 2000 IP Infusion Inc. * * Written by Kunihiro Ishiguro <kunihiro@zebra.org> @@ -885,6 +886,14 @@ lsdb_lookup_next (struct ospf_area *area, u_char *type, int type_next, else i = *type; + /* Sanity check, if LSA type unknwon + merley skip any LSA */ + if ((i < OSPF_MIN_LSA) || (i >= OSPF_MAX_LSA)) + { + zlog_debug("Strange request with LSA type %d\n", i); + return NULL; + } + for (; i < OSPF_MAX_LSA; i++) { *type = i; @@ -1673,7 +1682,7 @@ ospfIfEntry (struct variable *v, oid *name, size_t *length, int exact, return SNMP_INTEGER (OSPF_POLL_INTERVAL_DEFAULT); break; case OSPFIFSTATE: /* 12 */ - return SNMP_INTEGER (oi->state); + return SNMP_INTEGER (ISM_SNMP(oi->state)); break; case OSPFIFDESIGNATEDROUTER: /* 13 */ return SNMP_IPADDRESS (DR (oi)); |