Daniel Ng | 1 Sep 2008 04:03
Picon

[quagga-dev 5834] Re: Feedback on patches?

Joakim Tjernlund <joakim.tjernlund <at> transmode.se> writes:
> Almost a week(Monday) has passed since I sent 7 small patches but no
> feedback so far. I think they are all ready for general consumption.

I've tried to apply the patches to 0.99.10 but they fail to apply. Should I be 
doing it this way, or should I somehow use the git repositories directly? If 
so, can you please give some basic steps on how to do this?

Joakim Tjernlund | 1 Sep 2008 08:53
Picon

[quagga-dev 5835] Re: Feedback on patches?

On Mon, 2008-09-01 at 02:03 +0000, Daniel Ng wrote:
> Joakim Tjernlund <joakim.tjernlund <at> transmode.se> writes:
> > Almost a week(Monday) has passed since I sent 7 small patches but no
> > feedback so far. I think they are all ready for general consumption.
> 
> I've tried to apply the patches to 0.99.10 but they fail to apply. Should I be 
> doing it this way, or should I somehow use the git repositories directly? If 
> so, can you please give some basic steps on how to do this?

Use the git repo then(dunno why the patches fail for you):
git clone git://code.quagga.net/people/jocke/quagga
cd quagga
./update-autotools (or ./bootstrap.sh)
Joakim Tjernlund | 1 Sep 2008 09:26
Picon

[quagga-dev 5836] Re: Feedback on patches?

On Mon, 2008-09-01 at 08:53 +0200, Joakim Tjernlund wrote:
> On Mon, 2008-09-01 at 02:03 +0000, Daniel Ng wrote:
> > Joakim Tjernlund <joakim.tjernlund <at> transmode.se> writes:
> > > Almost a week(Monday) has passed since I sent 7 small patches but no
> > > feedback so far. I think they are all ready for general consumption.
> > 
> > I've tried to apply the patches to 0.99.10 but they fail to apply. Should I be 
> > doing it this way, or should I somehow use the git repositories directly? If 
> > so, can you please give some basic steps on how to do this?
> 
> Use the git repo then(dunno why the patches fail for you):
> git clone git://code.quagga.net/people/jocke/quagga
> cd quagga
> ./update-autotools (or ./bootstrap.sh)

BTW, "gitk --all" gives you a nice GUI to look at the changes.

Could you test with at least 3 Quagga nodes? I found a few
bugs earlier than didn't show up until I got some distance between them.

 Jocke
Joakim Tjernlund | 1 Sep 2008 14:18
Picon

[quagga-dev 5837] [PATCH] [ospfd] Swap ISM_DR and ISM_DROther numeric constants

ISM_DR and ISM_DROther are swapped wrt RFC. This can be
somewhat confusing when chasing down bugs. Swap them
and adjust code accordingly.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund <at> transmode.se>
---
 ospfd/ospf_dump.c |    4 ++--
 ospfd/ospf_ism.c  |   22 +++++++++++-----------
 ospfd/ospf_ism.h  |    8 +++-----
 3 files changed, 16 insertions(+), 18 deletions(-)

diff --git a/ospfd/ospf_dump.c b/ospfd/ospf_dump.c
index 2fcbfe6..334ab17 100644
--- a/ospfd/ospf_dump.c
+++ b/ospfd/ospf_dump.c
 <at>  <at>  -49,9 +49,9  <at>  <at>  struct message ospf_ism_state_msg[] =
   { ISM_Loopback,     "Loopback" },
   { ISM_Waiting,      "Waiting" },
   { ISM_PointToPoint, "Point-To-Point" },
-  { ISM_DROther,      "DROther" },
-  { ISM_Backup,       "Backup" },
   { ISM_DR,           "DR" },
+  { ISM_Backup,       "Backup" },
+  { ISM_DROther,      "DROther" },
 };
 int ospf_ism_state_msg_max = OSPF_ISM_STATE_MAX;

diff --git a/ospfd/ospf_ism.c b/ospfd/ospf_ism.c
index f215bfc..2ffbe3c 100644
--- a/ospfd/ospf_ism.c
(Continue reading)

Denis Ovsienko | 1 Sep 2008 16:37
Favicon

[quagga-dev 5838] Re: Parsing "show ip ospf interface"

> Trying to parse  "show ip ospf interface" within C and it is no fun:(
> The command has very unfriendly syntax for such parsing.
>
> Would a new option to "show ip ospf interface"(or a new command)
> which lists the interfaces in a machine friendly way be welcome in
> Quagga?

Hello.

The syntax is mimicing those of IOS (tm), so if you manage to parse it,
you can hit two targets at once. As for the best way to do it, this
task is worth about a screen of lex (flex) code. Lex produces C
code, which can be embedded into your custom program.

I hope it helps.

--

-- 
    DO4-UANIC
paul | 1 Sep 2008 16:41
Picon

[quagga-dev 5839] Re: Update: unnumbered PtP support for OSPF.

On Fri, 29 Aug 2008, Joakim Tjernlund wrote:

> I have rebased my tree and pushed it to
> git://code.quagga.net/people/jocke/quagga

Hmm, it's a good job I havn't merged other patches of yours then.

You can't rebase heads you've published, least not if you expect 
anyone to ever merge those heads AND you wish to avoid complicating 
things significantly for them.

We need to work out some kind of protocol here..

regard,
--

-- 
Paul Jakma	paul <at> clubi.ie	paul <at> jakma.org	Key ID: 64A2FF6A
Fortune:
I never cheated an honest man, only rascals.  They wanted something for
nothing.  I gave them nothing for something.
 		-- Joseph "Yellow Kid" Weil
Joakim Tjernlund | 1 Sep 2008 16:45
Picon

[quagga-dev 5840] Monotonic time, RFC

There appears to some problems when gettimeofday() jumps dues to ntpdate
or similar.

In Linux/UNIX there is one system call that returns a monotonic value,
times(2).

This can be exploited in quagga_time():

diff --git a/lib/thread.c b/lib/thread.c
index 260e8c8..768372c 100644
--- a/lib/thread.c
+++ b/lib/thread.c
 <at>  <at>  -202,11 +202,24  <at>  <at>  quagga_gettime (enum quagga_clkid clkid, struct timeval *tv)
 time_t
 quagga_time (time_t *t)
 {
+#ifdef GNU_LINUX
+  static long clocks_per_tick;
+  clock_t cl;
+
+  if (!clocks_per_tick)
+    clocks_per_tick = sysconf(_SC_CLK_TCK);
+  cl = times(NULL);
+  cl = cl / clocks_per_tick; /* convert to seconds */
+  if (t)
+    *t = cl;
+  return cl;
+#else
   struct timeval tv;
   quagga_real_stabilised (&tv);
(Continue reading)

paul | 1 Sep 2008 17:06
Picon

[quagga-dev 5841] Re: Monotonic time, RFC

On Mon, 1 Sep 2008, Joakim Tjernlund wrote:

> There appears to some problems when gettimeofday() jumps dues to 
> ntpdate or similar.

That's possible.

> In Linux/UNIX there is one system call that returns a monotonic value,
> times(2).

> However, to avoid strange jumps when times() wrap, one must change 
> quagga_time() to return ticks instead of seconds.

That's a non-starter then, as quagga_time() is meant to be a drop-in 
replacement for time().

> QUAGGA_CLK_MONOTONIC also needs to adjusted accordingly.
>
> Comments?

What were the problems you saw? They likely need to be fixed..

regards,
--

-- 
Paul Jakma	paul <at> clubi.ie	paul <at> jakma.org	Key ID: 64A2FF6A
Fortune:
A Linux machine! because a 486 is a terrible thing to waste!
(By jjs <at> wintermute.ucr.edu, Joe Sloan)
Joakim Tjernlund | 1 Sep 2008 17:56
Picon

[quagga-dev 5842] Re: Update: unnumbered PtP support for OSPF.

> -----Original Message-----
> From: paul <at> clubi.ie [mailto:paul <at> clubi.ie]
> Sent: den 1 september 2008 16:42
> To: Joakim Tjernlund
> Cc: quagga-dev
> Subject: Re: [quagga-dev 5832] Update: unnumbered PtP support for OSPF.
> 
> On Fri, 29 Aug 2008, Joakim Tjernlund wrote:
> 
> > I have rebased my tree and pushed it to
> > git://code.quagga.net/people/jocke/quagga
> 
> Hmm, it's a good job I havn't merged other patches of yours then.

If you had, I would have started my new tree from there so
it that is not a problem. Also, I haven't asked you to pull
anything yet. I sent a few patches that needs to go in first
and which I think is safe. I sent those first few because I
have a hard time to get anything into the tree.

I know I don't have a history with Quagga so you obviously
need to look extra on my patches, but this is getting a bit
annoying as not even the simplest SEGV bug fix has gone in or
commented upon.

> 
> You can't rebase heads you've published, least not if you expect
> anyone to ever merge those heads AND you wish to avoid complicating
> things significantly for them.

(Continue reading)

Joakim Tjernlund | 1 Sep 2008 18:03
Picon

[quagga-dev 5843] Re: Monotonic time, RFC

> -----Original Message-----
> From: paul <at> clubi.ie [mailto:paul <at> clubi.ie]
> Sent: den 1 september 2008 17:07
> To: Joakim Tjernlund
> Cc: quagga-dev
> Subject: Re: [quagga-dev 5840] Monotonic time, RFC
> 
> On Mon, 1 Sep 2008, Joakim Tjernlund wrote:
> 
> > There appears to some problems when gettimeofday() jumps dues to
> > ntpdate or similar.
> 
> That's possible.
> 
> > In Linux/UNIX there is one system call that returns a monotonic value,
> > times(2).
> 
> > However, to avoid strange jumps when times() wrap, one must change
> > quagga_time() to return ticks instead of seconds.
> 
> That's a non-starter then, as quagga_time() is meant to be a drop-in
> replacement for time().

Yeah, I see that now.

> 
> > QUAGGA_CLK_MONOTONIC also needs to adjusted accordingly.
> >
> > Comments?
> 
(Continue reading)


Gmane