Index | Thread | Search

From:
Jonathan Matthew <jonathan@d14n.org>
Subject:
Re: snmpd: move engineid into a struct
To:
Martijn van Duren <openbsd+tech@list.imperialat.at>
Cc:
tech@openbsd.org
Date:
Tue, 23 Dec 2025 13:36:32 +1000

Download raw body.

Thread
On Mon, Dec 22, 2025 at 12:16:43PM +0100, Martijn van Duren wrote:
> On 11/9/25 12:51, Martijn van Duren wrote:
> > This diff is a bit of preparation for the next diff.
> > Initially I went a bit too simplistic and simply put the engineid value
> > and length in two separate variables inside the requiring structs. This
> > diff bundles the 2 variables into a struct engineid. This also helps with the
> > parse.y stuff.
> > 
> > This diff is on top of the "move smi_getticks to appl_sysuptime" diff.
> > It might apply without it, but not tested.
> > 
> > OK?
> > 
> > martijn@
> > 
> Updated diff. jmatthew@ found that the pen vanished from the engineid.
> Simplified the problem boils down to this:
> foo: bar {
> 	$$[0] = 1;
> } baz {
> 	$$[1] = 2
> }
> Where I expected the result to be {1, 2}, but I got {0, 2}. I merged
> the two bodies, which gives a cleaner result anyway, but I'm still
> curious how this is supposed to work. If anyone has an idea, feel free
> to speak up.

That's beyond my understanding of yacc, but this version of the diff
produces the right engine IDs and otherwise makes sense.
ok jmatthew@