Revert interface setting rename so it doesn't break existing configurations.
This commit is contained in:
@@ -157,7 +157,7 @@ Here are more details on the layout of the runtime configuration.
|
|||||||
| ---- | ---- | ------- | ----------- |
|
| ---- | ---- | ------- | ----------- |
|
||||||
| verbose | int | `2` | The verbose level for logging (0 - 5 supported so far). |
|
| verbose | int | `2` | The verbose level for logging (0 - 5 supported so far). |
|
||||||
| log_file | string | `/var/log/xdpfw.log` | The log file location. If the string is empty (`""`), the log file is disabled. |
|
| log_file | string | `/var/log/xdpfw.log` | The log file location. If the string is empty (`""`), the log file is disabled. |
|
||||||
| interfaces | string \| list of strings | `NULL` | The network interface(s) to attach the XDP program to (usually retrieved with `ip a` or `ifconfig`). |
|
| interface | string \| list of strings | `NULL` | The network interface(s) to attach the XDP program to (usually retrieved with `ip a` or `ifconfig`). |
|
||||||
| pin_maps | bool | `true` | Pins main BPF maps to `/sys/fs/bpf/xdpfw/[map_name]` on the file system. |
|
| pin_maps | bool | `true` | Pins main BPF maps to `/sys/fs/bpf/xdpfw/[map_name]` on the file system. |
|
||||||
| update_time | int | `0` | How often to update the config and filtering rules from the file system in seconds (0 disables). |
|
| update_time | int | `0` | How often to update the config and filtering rules from the file system in seconds (0 disables). |
|
||||||
| no_stats | bool | `false` | Whether to enable or disable packet counters. Disabling packet counters will improve performance, but result in less visibility on what the XDP Firewall is doing. |
|
| no_stats | bool | `false` | Whether to enable or disable packet counters. Disabling packet counters will improve performance, but result in less visibility on what the XDP Firewall is doing. |
|
||||||
@@ -234,7 +234,7 @@ Here's a runtime config example.
|
|||||||
```squidconf
|
```squidconf
|
||||||
verbose = 5;
|
verbose = 5;
|
||||||
log_file = "";
|
log_file = "";
|
||||||
interfaces = "ens18";
|
interface = "ens18";
|
||||||
pin_maps = true;
|
pin_maps = true;
|
||||||
update_time = 15;
|
update_time = 15;
|
||||||
no_stats = false;
|
no_stats = false;
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ int parse_cfg(config__t *cfg, const char* data, config_overrides_t* overrides)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get interface(s).
|
// Get interface(s).
|
||||||
config_setting_t* interfaces = config_lookup(&conf, "interfaces");
|
config_setting_t* interfaces = config_lookup(&conf, "interface");
|
||||||
|
|
||||||
if (interfaces)
|
if (interfaces)
|
||||||
{
|
{
|
||||||
@@ -252,7 +252,7 @@ int parse_cfg(config__t *cfg, const char* data, config_overrides_t* overrides)
|
|||||||
{
|
{
|
||||||
const char* interface;
|
const char* interface;
|
||||||
|
|
||||||
if (config_lookup_string(&conf, "interfaces", &interface) == CONFIG_TRUE)
|
if (config_lookup_string(&conf, "interface", &interface) == CONFIG_TRUE)
|
||||||
{
|
{
|
||||||
if (cfg->interfaces[0])
|
if (cfg->interfaces[0])
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
verbose = 2;
|
verbose = 2;
|
||||||
log_file = "/var/log/xdpfw.log";
|
log_file = "/var/log/xdpfw.log";
|
||||||
interfaces = "ens18";
|
interface = "ens18";
|
||||||
update_time = 15;
|
update_time = 15;
|
||||||
no_stats = false;
|
no_stats = false;
|
||||||
stats_per_second = false;
|
stats_per_second = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user