From f62c04c9eb911afa50234e83c2ee43154865bd20 Mon Sep 17 00:00:00 2001 From: Vern Paxson Date: Fri, 11 Mar 2022 14:24:39 -0800 Subject: [PATCH] tweaks to base scripts revealed by switch to expression-based initialization --- scripts/base/frameworks/software/main.zeek | 2 +- scripts/base/protocols/dhcp/consts.zeek | 4 ++-- scripts/base/protocols/ssl/main.zeek | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/base/frameworks/software/main.zeek b/scripts/base/frameworks/software/main.zeek index 9fed88668b..b6a86ba644 100644 --- a/scripts/base/frameworks/software/main.zeek +++ b/scripts/base/frameworks/software/main.zeek @@ -95,7 +95,7 @@ export { ## even if it exposes itself with an alternate name. The ## yielded string is the name that will be logged and generally ## used for everything. - global alternate_names: table[string] of string { + global alternate_names: table[string] of string = { ["Flash Player"] = "Flash", } &default=function(a: string): string { return a; }; diff --git a/scripts/base/protocols/dhcp/consts.zeek b/scripts/base/protocols/dhcp/consts.zeek index 0bf16ded96..8507e91c9f 100644 --- a/scripts/base/protocols/dhcp/consts.zeek +++ b/scripts/base/protocols/dhcp/consts.zeek @@ -28,7 +28,7 @@ export { } &default = function(n: count): string { return fmt("unknown-message-type-%d", n); }; ## Option types mapped to their names. - const option_types: table[int] of string = { + const option_types = { [0] = "Pad", [1] = "Subnet Mask", [2] = "Time Offset", @@ -185,5 +185,5 @@ export { [221] = "Virtual Subnet Selection (VSS) Option", [252] = "auto-proxy-config", [255] = "End", - } &default = function(n: int): string { return fmt("unknown-option-type-%d", n); }; + } &default = function(n: count): string { return fmt("unknown-option-type-%d", n); }; } diff --git a/scripts/base/protocols/ssl/main.zeek b/scripts/base/protocols/ssl/main.zeek index 3812b08214..9257a89922 100644 --- a/scripts/base/protocols/ssl/main.zeek +++ b/scripts/base/protocols/ssl/main.zeek @@ -108,7 +108,7 @@ export { ## The default root CA bundle. By default, the mozilla-ca-list.zeek ## script sets this to Mozilla's root CA list. - const root_certs: table[string] of string = {} &redef; + const root_certs: table[string] of string &redef; ## The record type which contains the field for the Certificate ## Transparency log bundle.