Re: relayd(8) remove snmp keyword

2020-10-30 Thread Sebastian Benoit
ok benno@

and yes, add a line to current.html.

Denis Fondras(open...@ledeuns.net) on 2020.10.30 10:13:56 +0100:
> On Thu, Oct 29, 2020 at 03:51:24PM +0100, Martijn van Duren wrote:
> > 6.8 is out in the wild. I guess this is as good a time as any to remove
> > the old snmp keyword.
> > 
> > OK?
> > 
> 
> OK denis@
> 
> And while it is fresh, is this the right time to update plus.html and
> current.html ?
> 



Re: relayd(8) remove snmp keyword

2020-10-30 Thread Denis Fondras
On Thu, Oct 29, 2020 at 03:51:24PM +0100, Martijn van Duren wrote:
> 6.8 is out in the wild. I guess this is as good a time as any to remove
> the old snmp keyword.
> 
> OK?
> 

OK denis@

And while it is fresh, is this the right time to update plus.html and
current.html ?



relayd(8) remove snmp keyword

2020-10-29 Thread Martijn van Duren
6.8 is out in the wild. I guess this is as good a time as any to remove
the old snmp keyword.

OK?

martijn@

Index: parse.y
===
RCS file: /cvs/src/usr.sbin/relayd/parse.y,v
retrieving revision 1.248
diff -u -p -r1.248 parse.y
--- parse.y 26 Oct 2020 16:52:06 -  1.248
+++ parse.y 29 Oct 2020 14:49:54 -
@@ -175,15 +175,15 @@ typedef struct {
 %token LOOKUP METHOD MODE NAT NO DESTINATION NODELAY NOTHING ON PARENT PATH
 %token PFTAG PORT PREFORK PRIORITY PROTO QUERYSTR REAL REDIRECT RELAY REMOVE
 %token REQUEST RESPONSE RETRY QUICK RETURN ROUNDROBIN ROUTE SACK SCRIPT SEND
-%token SESSION SNMP SOCKET SPLICE SSL STICKYADDR STYLE TABLE TAG TAGGED TCP
-%token TIMEOUT TLS TO ROUTER RTLABEL TRANSPARENT TRAP URL WITH TTL RTABLE
+%token SESSION SOCKET SPLICE SSL STICKYADDR STYLE TABLE TAG TAGGED TCP
+%token TIMEOUT TLS TO ROUTER RTLABEL TRANSPARENT URL WITH TTL RTABLE
 %token MATCH PARAMS RANDOM LEASTSTATES SRCHASH KEY CERTIFICATE PASSWORD ECDHE
 %token EDH TICKETS CONNECTION CONNECTIONS CONTEXT ERRORS STATE CHANGES CHECKS
 %token WEBSOCKETS
 %token   STRING
 %token   NUMBER
-%typecontext hostname interface table value optstring path
-%typehttp_type loglevel quick trap
+%typecontext hostname interface table value path
+%typehttp_type loglevel quick
 %typedstmode flag forwardmode retry
 %typeopttls opttlsclient
 %typeredirect_proto relay_proto match
@@ -457,23 +457,6 @@ main   : INTERVAL NUMBER   {
AGENTX_MASTER_PATH,
sizeof(conf->sc_conf.agentx_path));
}
-   | SNMP trap optstring   {
-   log_warnx("The snmp keyword is deprecated, please use 
agentx");
-   conf->sc_conf.flags |= F_AGENTX;
-   if ($3) {
-   if (strlcpy(conf->sc_conf.agentx_path,
-   $3, sizeof(conf->sc_conf.agentx_path)) >=
-   sizeof(conf->sc_conf.agentx_path)) {
-   yyerror("agentx path truncated");
-   free($3);
-   YYERROR;
-   }
-   free($3);
-   } else
-   (void)strlcpy(conf->sc_conf.agentx_path,
-   "/var/run/agentx.sock",
-   sizeof(conf->sc_conf.agentx_path));
-   }
| SOCKET STRING {
conf->sc_ps->ps_csock.cs_name = $2;
}
@@ -485,9 +468,6 @@ path: /* nothing */ { $$ = NULL; }
 context: /* nothing */ { $$ = NULL; }
| CONTEXT STRING{ $$ = $2; }
 
-trap   : /* nothing */ { $$ = 0; }
-   | TRAP  { $$ = 1; }
-
 loglevel   : STATE CHANGES { $$ = RELAYD_OPT_LOGUPDATE; }
| HOST CHECKS   { $$ = RELAYD_OPT_LOGHOSTCHECK; }
| CONNECTION{ $$ = (RELAYD_OPT_LOGCON |
@@ -2371,10 +2351,6 @@ optnl: '\n' optnl
 
 nl : '\n' optnl
;
-
-optstring  : STRING{ $$ = $1; }
-   | /* nothing */ { $$ = NULL; }
-   ;
 %%
 
 struct keywords {
@@ -2499,7 +2475,6 @@ lookup(char *s)
{ "send",   SEND },
{ "session",SESSION },
{ "set",SET },
-   { "snmp",   SNMP },
{ "socket", SOCKET },
{ "source-hash",SRCHASH },
{ "splice", SPLICE },
@@ -2516,7 +2491,6 @@ lookup(char *s)
{ "tls",TLS },
{ "to", TO },
{ "transparent",TRANSPARENT },
-   { "trap",   TRAP },
{ "ttl",TTL },
{ "url",URL },
{ "value",  VALUE },