Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Quagga: Dev

[PATCH 2/2] ospfd: Fixes a crash of the daemon with a snmp walk

 

 

Quagga dev RSS feed   Index | Next | Previous | View Threaded


jorge at dti2

Apr 9, 2012, 9:03 AM

Post #1 of 3 (163 views)
Permalink
[PATCH 2/2] ospfd: Fixes a crash of the daemon with a snmp walk

From: "Jorge Boncompte [DTI2]" <jorge [at] dti2>

- And allows to walk the LSDB.

Signed-off-by: Jorge Boncompte [DTI2] <jorge [at] dti2>
---
ospfd/ospf_snmp.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/ospfd/ospf_snmp.c b/ospfd/ospf_snmp.c
index cc4974c..9c9dd47 100644
--- a/ospfd/ospf_snmp.c
+++ b/ospfd/ospf_snmp.c
@@ -934,7 +934,7 @@ ospfLsdbLookup (struct variable *v, oid *name, size_t *length,
struct ospf *ospf;
struct ospf_area *area;
struct ospf_lsa *lsa;
- unsigned int len;
+ int len;
int type_next;
int ls_id_next;
int router_id_next;
@@ -992,7 +992,7 @@ ospfLsdbLookup (struct variable *v, oid *name, size_t *length,
if (len == IN_ADDR_SIZE)
area = ospf_area_lookup_by_area_id (ospf, *area_id);
else
- area = ospf_area_lookup_next (ospf, area_id, len == 0 ? 1 : 0);
+ area = ospf_area_lookup_next (ospf, area_id, 1);

if (area == NULL)
return NULL;
@@ -1000,8 +1000,8 @@ ospfLsdbLookup (struct variable *v, oid *name, size_t *length,
do
{
/* Next we lookup type. */
- offset += IN_ADDR_SIZE;
- offsetlen -= IN_ADDR_SIZE;
+ offset += len;
+ offsetlen -= len;
len = offsetlen;

if (len <= 0)
--
1.7.8.3


_______________________________________________
Quagga-dev mailing list
Quagga-dev [at] lists
http://lists.quagga.net/mailman/listinfo/quagga-dev


jorge at dti2

Apr 9, 2012, 9:14 AM

Post #2 of 3 (153 views)
Permalink
Re: [PATCH 2/2] ospfd: Fixes a crash of the daemon with a snmp walk [In reply to]

There isn't a 1/2 patch on this series, sorry.

El 09/04/2012 18:03, Jorge Boncompte [DTI2] escribió:
> From: "Jorge Boncompte [DTI2]" <jorge [at] dti2>
>
> - And allows to walk the LSDB.
>
> Signed-off-by: Jorge Boncompte [DTI2] <jorge [at] dti2>
> ---
> ospfd/ospf_snmp.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/ospfd/ospf_snmp.c b/ospfd/ospf_snmp.c
> index cc4974c..9c9dd47 100644
> --- a/ospfd/ospf_snmp.c
> +++ b/ospfd/ospf_snmp.c
> @@ -934,7 +934,7 @@ ospfLsdbLookup (struct variable *v, oid *name, size_t *length,
> struct ospf *ospf;
> struct ospf_area *area;
> struct ospf_lsa *lsa;
> - unsigned int len;
> + int len;
> int type_next;
> int ls_id_next;
> int router_id_next;
> @@ -992,7 +992,7 @@ ospfLsdbLookup (struct variable *v, oid *name, size_t *length,
> if (len == IN_ADDR_SIZE)
> area = ospf_area_lookup_by_area_id (ospf, *area_id);
> else
> - area = ospf_area_lookup_next (ospf, area_id, len == 0 ? 1 : 0);
> + area = ospf_area_lookup_next (ospf, area_id, 1);
>
> if (area == NULL)
> return NULL;
> @@ -1000,8 +1000,8 @@ ospfLsdbLookup (struct variable *v, oid *name, size_t *length,
> do
> {
> /* Next we lookup type. */
> - offset += IN_ADDR_SIZE;
> - offsetlen -= IN_ADDR_SIZE;
> + offset += len;
> + offsetlen -= len;
> len = offsetlen;
>
> if (len <= 0)


_______________________________________________
Quagga-dev mailing list
Quagga-dev [at] lists
http://lists.quagga.net/mailman/listinfo/quagga-dev


equinox at diac24

Apr 17, 2012, 7:26 AM

Post #3 of 3 (140 views)
Permalink
Re: [PATCH 2/2] ospfd: Fixes a crash of the daemon with a snmp walk [In reply to]

On Mon, Apr 09, 2012 at 06:03:57PM +0200, Jorge Boncompte [DTI2] wrote:
> From: "Jorge Boncompte [DTI2]" <jorge [at] dti2>
>
> - And allows to walk the LSDB.
>
> Signed-off-by: Jorge Boncompte [DTI2] <jorge [at] dti2>

Applied, thanks.
Attachments: signature.asc (0.22 KB)

Quagga dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.