Hi Theo,

I appreciate you taking the time to respond, thanks for the insight. That solves that mystery.

I just wanted to take the opportunity to say Happy Birthday Theo, and thank you for making the greatest OS and software ecosystem around. With no hyperbole, OpenBSD has changed my life - it facilitated me overcoming some serious adversity when I first went out on my own and has given me the ability to earn a respectable living, and for that I thank you.

Regards,

Jordan

On 5/19/23 06:33, Theo de Raadt wrote:
Many of our daemons (and a few non-daemon tools) contain a a particular
parse.y parser for their domain-specific-languages.

This is how variables work in that parser.  This is kind of like a
historical mistake that would be hard to repair, because everytime we
looked into changing the way it works (by moving the expansion to a different
stage) it would break other user patterns.

Jordan Geoghegan <jor...@geoghegan.ca> wrote:

Hello,

I was playing around with my bgpd.conf and I noticed some interesting
behaviour with macros.

A quick example:

# This parses fine:
IP1="192.0.2.1"
MYIP=$IP1

# This throws a syntax error:
ASN1="65001"
MYASN=$ASN1

# This also parses fine:
ASN1="65001a"
MYASN=$ASN1

In short, it appears that having a numerical value for macro2=$macro1
breaks something in the config parser, or at the very least the
behaviour is undocumented.

Any insight or advice would be much appreciated.

Regards,

Jordan





Reply via email to