Hi,
(I would like to submit patches to fix this, but would first like to know whether I should update the documentation and command help text to reflect that 0 is an invalid rule ID, or if I should fix the segfault when 0 is used as a rule number.)
The documentation suggests using rule 0 for the load balancing rule.
The command help text suggests 0 is a valid rule number
[email protected]# set rule Possible completions: > <0-4294967295> Rule number
But, the code suggests that rule 0 is not valid.
And, more importantly, using rule 0 causes a segfault in wan_lb, preventing the load balancing system from ever working.
Starting out with this configuration:
set load-balancing wan interface-health eth0v11 nexthop '10.0.0.1' set load-balancing wan interface-health eth0v12 nexthop '10.0.0.1' set load-balancing wan rule 10 inbound-interface 'eth0.75' set load-balancing wan rule 10 interface eth0v11 set load-balancing wan rule 10 interface eth0v12
The above configuration works as expected. I can then add a rule 0 to induce the problem.
[edit load-balancing wan] [email protected]# set rule 0 inbound-interface eth0.75 [edit load-balancing wan] [email protected]# set rule 0 interface eth0 [edit load-balancing wan] [email protected]# commit [edit load-balancing wan] [email protected]# run show wan-load-balance WAN load balancing is not configured <----- WLB is now unavailable [edit load-balancing wan] [email protected]# /opt/vyatta/sbin/wan_lb -f /var/run/load-balance/wlb.conf -t Segmentation fault <---- segfault! [edit load-balancing wan] [email protected]# delete rule 0 [edit load-balancing wan] [email protected]# commit [edit load-balancing wan] [email protected]# /opt/vyatta/sbin/wan_lb -f /var/run/load-balance/wlb.conf -t [edit load-balancing wan] <---- no output, no segfault [email protected]# run show wan-load-balance Interface: eth0v11 Status: active Last Status Change: Sat Aug 3 01:22:24 2019 [...snip...]
[email protected]# run show version Version: VyOS 1.2.0-rolling+201906012240 Built by: [email protected] Built on: Sat 01 Jun 2019 22:40 UTC Build UUID: 41289fb3-fdc7-4041-a248-7e03d99687c0 Build Commit ID: e91ac330b78025 Architecture: x86_64 Boot via: installed image System type: KVM guest Hardware vendor: QEMU Hardware model: Standard PC (i440FX + PIIX, 1996) Hardware S/N: Unknown Hardware UUID: Unknown Copyright: VyOS maintainers and contributors
(also reproduced on 1.2.0-rolling+201907312142 )
Thanks!