[quagga-dev 15390] Re: quagga-1.0.20160315 bgp crash bgp_packet.c

2016-05-25 Thread Richard Savage


Can you get a core file, and use a debugger to see if there's a better
backtrace and crash location information?

-- have emailed you a core dump off list as it was fairly large as 2 
attachments.  Let me know if you need any more
Thanks
Rich





This e-mail is sent on behalf of Timico Partner Services Limited, a company 
registered in England and Wales, registered number 03128506, registered office 
Beacon Hill Park, Newark, Nottinghamshire, NG24 2TN and regulated by Ofcom. The 
information in this e-mail is confidential and is intended solely for the use 
of that individual or entity to which it is addressed. Unauthorised use, 
dissemination, distribution, publication or copying of this communication is 
strictly prohibited. If you receive this in error, please notify us by email to 
priv...@timico.co.uk and delete any copies. For 
information about how we process data and monitor communications please see our 
privacy 
statement.
___
Quagga-dev mailing list
Quagga-dev@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-dev

[quagga-dev 15389] Re: quagga-1.0.20160315 bgp crash bgp_packet.c

2016-05-25 Thread Paul Jakma

On Wed, 25 May 2016, Richard Savage wrote:


Can you compile Quagga with -g3 in the CFLAGs? It'd be nice to get a better 
backtrace.


Have compiled it with the flags above but still get the same 
backtrace:


Can you get a core file, and use a debugger to see if there's a better 
backtrace and crash location information?


regards,
--
Paul Jakma  p...@jakma.org  @pjakma Key ID: 64A2FF6A
Fortune:
Age before beauty; and pearls before swine.
-- Dorothy Parker

___
Quagga-dev mailing list
Quagga-dev@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-dev


[quagga-dev 15388] Re: [quagga-dev, 10944] fix snmp truncating integer value

2016-05-25 Thread Paul Jakma

Hi,

This is still in "Changes Requested" state.

What should we do?

regards,

Paul

On Mon, 10 Feb 2014, Feng Lu wrote:


On 01/-9/-28163 03:59 AM, Ilja Ryndin wrote:

 Signed-off-by: Ilja Ryndin


Hi,

I agree on the idea. While it seems better to use the macro SNMP_INTEGER(V), 
is it?


For example, to modify in rip2IfStatEntry():

diff --git a/ripd/rip_snmp.c b/ripd/rip_snmp.c
index 090ebfa..c43bbb1 100644
--- a/ripd/rip_snmp.c
+++ b/ripd/rip_snmp.c
@@ -365,21 +365,17 @@ rip2IfStatEntry (struct variable *v, oid name[], size_t 
*length,

   return SNMP_IPADDRESS (addr);
   break;
case RIP2IFSTATRCVBADPACKETS:
-  *var_len = sizeof (long);
-  return (u_char *) &ri->recv_badpackets;
+  return SNMP_INTEGER (ri->recv_badpackets);

case RIP2IFSTATRCVBADROUTES:
-  *var_len = sizeof (long);
-  return (u_char *) &ri->recv_badroutes;
+  return SNMP_INTEGER (ri->recv_badroutes);

case RIP2IFSTATSENTUPDATES:
-  *var_len = sizeof (long);
-  return (u_char *) &ri->sent_updates;
+  return SNMP_INTEGER (ri->sent_updates);

case RIP2IFSTATSTATUS:
-  *var_len = sizeof (long);
  v->type = ASN_INTEGER;
-  return (u_char *) &valid;
+  return SNMP_INTEGER (valid);

 default:
   return NULL;

Best regards,
Feng Lu

___
Quagga-dev mailing list
Quagga-dev@lists.quagga.net
http://lists.quagga.net/mailman/listinfo/quagga-dev



--
Paul Jakma  p...@jakma.org  @pjakma Key ID: 64A2FF6A
Fortune:
It's hard to be humble when you're perfect.

___
Quagga-dev mailing list
Quagga-dev@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-dev


[quagga-dev 15387] Re: quagga-1.0.20160315 bgp crash bgp_packet.c

2016-05-25 Thread Richard Savage
> Can you compile Quagga with -g3 in the CFLAGs? It'd be nice to get a better 
> backtrace.

Have compiled it with the flags above but still get the same backtrace:

BGP: Received signal 11 at 1464187311 (si_addr 0x887f768ff); aborting...
Backtrace for 5 stack frames:
0x800962e39  at /usr/local/lib/libzebra.so.0
0x800962408  at /usr/local/lib/libzebra.so.0
0x800974933  at /usr/local/lib/libzebra.so.0
0x801bc9b37  at /lib/libthr.so.3
0x801bc922c  at /lib/libthr.so.3
in thread bgp_read scheduled from bgp_packet.c:2472
This e-mail is sent on behalf of Timico Partner Services Limited, a company 
registered in England and Wales, registered number 03128506, registered office 
Beacon Hill Park, Newark, Nottinghamshire, NG24 2TN and regulated by Ofcom. The 
information in this e-mail is confidential and is intended solely for the use 
of that individual or entity to which it is addressed. Unauthorised use, 
dissemination, distribution, publication or copying of this communication is 
strictly prohibited. If you receive this in error, please notify us by email to 
priv...@timico.co.uk and delete any copies. For 
information about how we process data and monitor communications please see our 
privacy 
statement.


___
Quagga-dev mailing list
Quagga-dev@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-dev


[quagga-dev 15386] Re: [PATCH 1/3] ripngd: implement admin distance

2016-05-25 Thread Paul Jakma

Hi Roman,

This doesn't apply anymore unfortunately. If this is still useful, could 
you forward port to a more recent master and re-submit?


regards,

Paul

On Fri, 20 Dec 2013, Roman Hoog Antink wrote:



Until today the admin distance cannot be configured for any IPv6
routing protocol. This patch implements it for RIPng.

Signed-off-by: Maitane Zotes 

diff --git a/lib/memtypes.c b/lib/memtypes.c
index 47a3438..b53cce0 100644
--- a/lib/memtypes.c
+++ b/lib/memtypes.c
@@ -174,6 +174,7 @@ struct memory_list memory_list_ripng[] =
  { MTYPE_RIPNG_PEER, "RIPng peer"},
  { MTYPE_RIPNG_OFFSET_LIST,  "RIPng offset lst"  },
  { MTYPE_RIPNG_RTE_DATA, "RIPng rte data"},
+  { MTYPE_RIPNG_DISTANCE, "RIPng distance"  },
  { -1, NULL }
};

diff --git a/ripngd/ripng_interface.c b/ripngd/ripng_interface.c
index 8717bfb..848dee3 100644
--- a/ripngd/ripng_interface.c
+++ b/ripngd/ripng_interface.c
@@ -403,7 +403,7 @@ ripng_apply_address_add (struct connected *ifc) {
  if ((ripng_enable_if_lookup(ifc->ifp->name) >= 0) ||
  (ripng_enable_network_lookup2(ifc) >= 0))
ripng_redistribute_add(ZEBRA_ROUTE_CONNECT, RIPNG_ROUTE_INTERFACE,
-   &address, ifc->ifp->ifindex, NULL);
+   &address, ifc->ifp->ifindex, NULL, 0);

}

@@ -724,13 +724,13 @@ ripng_connect_set (struct interface *ifp, int set)
if ((ripng_enable_if_lookup(connected->ifp->name) >= 0) ||
(ripng_enable_network_lookup2(connected) >= 0))
  ripng_redistribute_add (ZEBRA_ROUTE_CONNECT, RIPNG_ROUTE_INTERFACE,
-  &address, connected->ifp->ifindex, NULL);
+  &address, connected->ifp->ifindex, NULL, 0);
  } else {
ripng_redistribute_delete (ZEBRA_ROUTE_CONNECT, RIPNG_ROUTE_INTERFACE,
   &address, connected->ifp->ifindex);
if (ripng_redistribute_check (ZEBRA_ROUTE_CONNECT))
  ripng_redistribute_add (ZEBRA_ROUTE_CONNECT, RIPNG_ROUTE_REDISTRIBUTE,
-  &address, connected->ifp->ifindex, NULL);
+  &address, connected->ifp->ifindex, NULL, 0);
  }
}
}
diff --git a/ripngd/ripng_zebra.c b/ripngd/ripng_zebra.c
index 68f37be..d970503 100644
--- a/ripngd/ripng_zebra.c
+++ b/ripngd/ripng_zebra.c
@@ -44,7 +44,7 @@ int ripng_interface_address_delete (int, struct zclient *, 
zebra_size_t);

void
ripng_zebra_ipv6_add (struct prefix_ipv6 *p, struct in6_addr *nexthop,
- unsigned int ifindex, u_char metric)
+ unsigned int ifindex, u_char metric, u_char distance)
{
  struct zapi_ipv6 api;

@@ -63,6 +63,12 @@ ripng_zebra_ipv6_add (struct prefix_ipv6 *p, struct in6_addr 
*nexthop,
  SET_FLAG (api.message, ZAPI_MESSAGE_METRIC);
  api.metric = metric;

+  if (distance && distance != ZEBRA_RIPNG_DISTANCE_DEFAULT)
+{
+  SET_FLAG (api.message, ZAPI_MESSAGE_DISTANCE);
+  api.distance = distance;
+}
+
  zapi_ipv6_route (ZEBRA_IPV6_ROUTE_ADD, zclient, p, &api);
}
}
@@ -137,7 +143,7 @@ ripng_zebra_read_ipv6 (int command, struct zclient *zclient,
api.metric = 0;

  if (command == ZEBRA_IPV6_ROUTE_ADD)
-ripng_redistribute_add (api.type, RIPNG_ROUTE_REDISTRIBUTE, &p, ifindex, 
&nexthop);
+ripng_redistribute_add (api.type, RIPNG_ROUTE_REDISTRIBUTE, &p, ifindex, 
&nexthop, api.distance);
  else
ripng_redistribute_delete (api.type, RIPNG_ROUTE_REDISTRIBUTE, &p, ifindex);

diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c
index 941c3a0..985b76a 100644
--- a/ripngd/ripngd.c
+++ b/ripngd/ripngd.c
@@ -628,11 +628,13 @@ ripng_route_process (struct rte *rte, struct sockaddr_in6 
*from,
  int ret;
  struct prefix_ipv6 p;
  struct route_node *rp;
-  struct ripng_info *rinfo;
+  struct ripng_info *rinfo, rinfotmp;
  struct ripng_interface *ri;
  struct in6_addr *nexthop;
  u_char oldmetric;
  int same = 0;
+  int route_reuse = 0;
+  unsigned char old_dist, new_dist;

  /* Make prefix structure. */
  memset (&p, 0, sizeof (struct prefix_ipv6));
@@ -738,7 +740,40 @@ ripng_route_process (struct rte *rte, struct sockaddr_in6 
*from,
  /* Redistributed route check. */
  if (rinfo->type != ZEBRA_ROUTE_RIPNG
  && rinfo->metric != RIPNG_METRIC_INFINITY)
-   return;
+{
+  /* Fill in a minimaly temporary ripng_info structure, for a future
+ ripng_distance_apply() use. */
+  memset (&rinfotmp, 0, sizeof (rinfotmp));
+  IPV6_ADDR_COPY (&rinfotmp.from, &from->sin6_addr);
+  rinfotmp.rp = rinfo->rp;
+  new_dist = ripng_distance_apply (&rinfotmp);
+  new_dist = new_dist ? new_dist : ZEBRA_RIPNG_DISTANCE_DEFAULT;
+  old_dist = rinfo->distance;
+  /* Only connected routes may have a valid NULL distance */
+  if (rinfo->type != ZEBRA_ROUTE_CONNECT)
+ol

[quagga-dev 15385] Re: quagga-1.0.20160315 bgp crash bgp_packet.c

2016-05-25 Thread Paul Jakma

On Wed, 25 May 2016, Richard Savage wrote:


That's all that was displayed in the bgpd.log file


If there is something else I can enable in quagga to get a better 
debug then please let me know and Ill see what I can get.


Can you compile Quagga with -g3 in the CFLAGs? It'd be nice to get a 
better backtrace.


Or could I get a core-dump.

Reading your email again, the "Unsupported AFI" messages are likely 
harmless and irrelevant.



Thanks

Richard


This e-mail is sent on behalf of Timico Partner Services Limited, a 
company registered in England and Wales, registered number 03128506, 
registered office Beacon Hill Park, Newark, Nottinghamshire, NG24 2TN 
and regulated by Ofcom. The information in this e-mail is confidential 
and is intended solely for the use of that individual or entity to 
which it is addressed. 


Note, this kind of disclaimer is somewhat inappropriate to put on emails 
to a public list.


regards,
--
Paul Jakma  p...@jakma.org  @pjakma Key ID: 64A2FF6A
Fortune:
Never put off until tomorrow what you can do the day after.

___
Quagga-dev mailing list
Quagga-dev@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-dev


[quagga-dev 15384] Re: [PATCH] lib: add skiplists; use for thread sorting by default

2016-05-25 Thread Paul Jakma

On Wed, 25 May 2016, David Lamparter wrote:

This patch, in its application for timer management, has been 
superseded by the following one:



commit 4becea724ccd87e88f8454622ae227308b5fa3ce
Author: Christian Franke 
AuthorDate: Tue Nov 19 14:11:42 2013 +
Commit: David Lamparter 
CommitDate: Tue Apr 22 21:17:00 2014 +0200

   lib: use heap to manage timers

   Signed-off-by: Christian Franke 
   Signed-off-by: David Lamparter 

To my knowledge, Lou still has some skiplist use cases in other places.


Cool.

I was going to ask if skiplist was the most appropriate DS for timer, 
though regardless, surely a lot better than a simple list. ;)


regards,
--
Paul Jakma  p...@jakma.org  @pjakma Key ID: 64A2FF6A
Fortune:
Where do you go to get anorexia?
-- Shelley Winters

___
Quagga-dev mailing list
Quagga-dev@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-dev


[quagga-dev 15383] Re: [PATCH] lib: add skiplists; use for thread sorting by default

2016-05-25 Thread Lou Berger
See http://patchwork.quagga.net/patch/1940/


On 5/25/2016 10:16 AM, Paul Jakma wrote:
> Hi Paul Z,
>
> On Wed, 24 Apr 2013, G. Paul Ziemba wrote:
>
>> Very good; I'll incorporate this approach into the next version of
>> the patch.
> Do you have an updated version since?
>
> regards,



___
Quagga-dev mailing list
Quagga-dev@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-dev


[quagga-dev 15382] Re: [PATCH] lib: add skiplists; use for thread sorting by default

2016-05-25 Thread David Lamparter
On Wed, May 25, 2016 at 03:16:09PM +0100, Paul Jakma wrote:
> On Wed, 24 Apr 2013, G. Paul Ziemba wrote:
> > Very good; I'll incorporate this approach into the next version of
> > the patch.
> 
> Do you have an updated version since?

This patch, in its application for timer management, has been superseded by
the following one:

commit 4becea724ccd87e88f8454622ae227308b5fa3ce
Author: Christian Franke 
AuthorDate: Tue Nov 19 14:11:42 2013 +
Commit: David Lamparter 
CommitDate: Tue Apr 22 21:17:00 2014 +0200

lib: use heap to manage timers

Signed-off-by: Christian Franke 
Signed-off-by: David Lamparter 

To my knowledge, Lou still has some skiplist use cases in other places.


-David

___
Quagga-dev mailing list
Quagga-dev@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-dev


[quagga-dev 15380] Re: [PATCH] lib: add skiplists; use for thread sorting by default

2016-05-25 Thread Paul Jakma

Hi Paul Z,

On Wed, 24 Apr 2013, G. Paul Ziemba wrote:


Very good; I'll incorporate this approach into the next version of
the patch.


Do you have an updated version since?

regards,
--
Paul Jakma  p...@jakma.org  @pjakma Key ID: 64A2FF6A
Fortune:
Who are you?

___
Quagga-dev mailing list
Quagga-dev@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-dev


[quagga-dev 15381] Re: quagga-1.0.20160315 bgp crash bgp_packet.c

2016-05-25 Thread Richard Savage
>Likely my fault, what ever it is.
>
>There is this:
>
>  http://patchwork.quagga.net/patch/1921/
>
>Though, it should only affect generation of a log message, I thought.
>
>Can you get a better backtrace? It's the stuff past pthread_getspecific I'd be 
>interested in.

That's all that was displayed in the bgpd.log file

If there is something else I can enable in quagga to get a better debug then 
please let me know and Ill see what I can get.

Thanks

Richard
This e-mail is sent on behalf of Timico Partner Services Limited, a company 
registered in England and Wales, registered number 03128506, registered office 
Beacon Hill Park, Newark, Nottinghamshire, NG24 2TN and regulated by Ofcom. The 
information in this e-mail is confidential and is intended solely for the use 
of that individual or entity to which it is addressed. Unauthorised use, 
dissemination, distribution, publication or copying of this communication is 
strictly prohibited. If you receive this in error, please notify us by email to 
priv...@timico.co.uk and delete any copies. For 
information about how we process data and monitor communications please see our 
privacy 
statement.


___
Quagga-dev mailing list
Quagga-dev@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-dev


[quagga-dev 15379] Re: quagga-1.0.20160315 bgp crash bgp_packet.c

2016-05-25 Thread Paul Jakma

On Tue, 24 May 2016, Richard Savage wrote:

There seems to be a bug on loading prefixes from other neighbors and 
bgp will crash at the same point everytime:


BGP: Received signal 10 at 1464125380 (si_addr 0x80143aa62); aborting...
Backtrace for 5 stack frames:
0x80091465d  at /usr/local/lib/libzebra.so.0
0x800913dc5  at /usr/local/lib/libzebra.so.0
0x80091f7a8  at /usr/local/lib/libzebra.so.0
0x801b71b37  at /lib/libthr.so.3
0x801b7122c  at /lib/libthr.so.3
in thread bgp_read scheduled from bgp_packet.c:2472

There are also a lot of messages in the logs regarding the following:

2016/05/24 22:29:40 BGP: unknown afi/safi (0/0)
2016/05/24 22:29:40 BGP: xxx.xxx.xxx.xxx[Info] UPDATE with unsupported AFI/SAFI 
0/0

Has the above crash been looked at as a bug and is there a new release 
due soon that might fix this?


Likely my fault, what ever it is.

There is this:

  http://patchwork.quagga.net/patch/1921/

Though, it should only affect generation of a log message, I thought.

Can you get a better backtrace? It's the stuff past pthread_getspecific 
I'd be interested in.


regards,
--
Paul Jakma  p...@jakma.org  @pjakma Key ID: 64A2FF6A
Fortune:
The [Ford Foundation] is a large body of money completely surrounded by
people who want some.
-- Dwight MacDonald

___
Quagga-dev mailing list
Quagga-dev@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-dev


[quagga-dev 15378] Re: quagga-1.0.20160315 bgp crash bgp_packet.c

2016-05-25 Thread Martin Winter

Richard,

I don’t think this is anything known.
Unless someone else here knows something obvious, I would appreciate if 
you could
send me a pcap of the bgp traffic. This should allow me to reproduce and 
narrow down

the problem.

Feel free to email it to me directly.

Regards,
   Martin Winter


On 24 May 2016, at 16:14, Richard Savage wrote:


Hi

Using FreeBSD 10.3 and quagga version 1.0.20160315

There seems to be a bug on loading prefixes from other neighbors and  
bgp will crash at the same point everytime:


BGP: Received signal 10 at 1464125380 (si_addr 0x80143aa62); 
aborting...

Backtrace for 5 stack frames:
0x80091465d  at 
/usr/local/lib/libzebra.so.0

0x800913dc5  at /usr/local/lib/libzebra.so.0
0x80091f7a8  at /usr/local/lib/libzebra.so.0
0x801b71b37  at /lib/libthr.so.3
0x801b7122c  at /lib/libthr.so.3
in thread bgp_read scheduled from bgp_packet.c:2472

There are also a lot of messages in the logs regarding the following:

2016/05/24 22:29:40 BGP: unknown afi/safi (0/0)
2016/05/24 22:29:40 BGP: xxx.xxx.xxx.xxx[Info] UPDATE with unsupported 
AFI/SAFI 0/0


Has the above crash been looked at as a bug and is there a new release 
due soon that might fix this?


Many thanks

Richard
This e-mail is sent on behalf of Timico Partner Services Limited, a 
company registered in England and Wales, registered number 03128506, 
registered office Beacon Hill Park, Newark, Nottinghamshire, NG24 2TN 
and regulated by Ofcom. The information in this e-mail is confidential 
and is intended solely for the use of that individual or entity to 
which it is addressed. Unauthorised use, dissemination, distribution, 
publication or copying of this communication is strictly prohibited. 
If you receive this in error, please notify us by email to 
priv...@timico.co.uk and delete any 
copies. For information about how we process data and monitor 
communications please see our privacy 
statement.

___
Quagga-dev mailing list
Quagga-dev@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-dev


___
Quagga-dev mailing list
Quagga-dev@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-dev