Project

General

Profile

Bug #6505

dpinger - socket name too large

Added by Daniel Hoffend almost 3 years ago. Updated over 2 years ago.

Status:
Resolved
Priority:
Normal
Category:
Gateway monitoring
Target version:
Start date:
06/20/2016
Due date:
% Done:

0%

Estimated time:
Affected Version:
2.3.x
Affected Architecture:

Description

The combination of gateway name + link-local dhcp6 address + vlan interface name create a very long socket name. In my case the socket name 7 characters to long.

Gateway manual definition:

  • Interface Name: WAN_178
  • Real Interface: vtnet0_vlan41
  • Gateway Name: GW_WAN178_v6
  • IP Address (gateway ip): fe80::5054:ff:fee0:a429%vtnet0_vlan41

Logfile (system.log):

Jun 20 21:54:14 wanpf1 php-fpm[270]: /status_services.php: The command '/usr/local/bin/dpinger -S -r 0 -i GW_WAN179_v6 -B fe80::5054:ff:fe21:b15c%vtnet0_vlan42 -p /var/run/dpinger_GW_WAN179_v6_fe80::5054:ff:fe21:b15c%vtnet0_vlan42_fe80::5054:ff:fe88:c1d8%vtnet0_vlan42.pid -u /var/run/dpinger_GW_WAN179_v6_fe80::5054:ff:fe21:b15c%vtnet0_vlan42_fe80::5054:ff:fe88:c1d8%vtnet0_vlan42.sock -C "/etc/rc.gateway_alarm" -d 0 -s 500 -l 2000 -t 60000 -A 1000 -D 500 -L 20  fe80::5054:ff:fe88:c1d8%vtnet0_vlan42 >/dev/null' returned exit code '1', the output was ''

Command:

[2.3.1-RELEASE][root@wanpf.example.org]/root: /usr/local/bin/dpinger -S -r 0 -i GW_WAN179_v6 -B fe80::5054:ff:fe21:b15c%vtnet0_vlan42 -p /var/run/dpinger_GW_WAN179_v6_fe80::5054:ff:fe21:b15c%vtnet0_vlan42_fe80::5054:ff:fe88:c1d8%vtnet0_vlan42.pid -u /var/run/dpinger_GW_WAN179_v6_fe80::5054:ff:fe21:b15c%vtnet0_vlan42_fe80::5054:ff:fe88:c1d8%vtnet0_vlan42.sock -C "/etc/rc.gateway_alarm" -d 0 -s 500 -l 2000 -t 60000 -A 1000 -D 500 -L 20 fe80::5054:ff:fe88:c1d8%vtnet0_vlan42
socket name too large

I guess the double use of the ipv6 is the combination of gateway ip + monitor ip

Version tested

I'm using pfsense 2.3.1_5

History

#1 Updated by Daniel Hoffend almost 3 years ago

With redunced Gateway name (max 5 chars) I could make the dpinger work and start properly. I even can see the icmp6 request/reply packages but the gateway monitoring overview still show them as PENDING. So something is preventing the dpinger to request the correct status data from the dpinger.

#2 Updated by Chris Buechler almost 3 years ago

  • Target version deleted (2.3.1-p2)

#3 Updated by Daniel Hoffend almost 3 years ago

Looking at the code from dpinger it seems that this is not something we really can count on.

https://github.com/dennypage/dpinger/blob/master/dpinger.c#L1203

It seems to be a architecture thing for backwards compatibility. I'm not sure how this can be solved:

Right now the socket name convention seems to be like

/var/run/dpinger_<name>_<localip>_<remoteip>.sock

It get's even problematic. In the gwlb.inc code, the function running_dpinger_processes() expects that the src and target ip does not include underscores which it actually does (in the vlan sub interface). This cause the Gateway Status to stay always at pending. Maybe switching from _ to ~ would be a solution because ~ is not included in IPv4, IPv6 or interface records.

Then we would still have the issue with long socket names. Maybe using an md5 hash around localip+remoteip could solve the issue with long interface names ... but this could create problems when the gateways status page tries to connect to dpinger to get current results.

Now we've 2 issues :-/

1) long socket names when having long interface names (vlan, etc) and IPv6 link-local addresses. Not sure if the same applies for pid files.

2) gateway monitoring scripts expect that the local/remote ip doesn't contain underscores (which is does when using vlan subifs)

#4 Updated by Daniel Hoffend almost 3 years ago

The bug has been traced down and fixed. Pull Request is up (ICLA already signed).
https://github.com/pfsense/pfsense/pull/3027

#5 Updated by Chris Buechler almost 3 years ago

  • Status changed from New to Feedback
  • Target version set to 2.3.1-p6
  • Affected Version changed from 2.3 to 2.3.x

Thanks Daniel! Looks good, merged to all 3 branches.

#6 Updated by Chris Buechler almost 3 years ago

  • Status changed from Feedback to Resolved

works

#7 Updated by Chris Buechler almost 3 years ago

  • Target version changed from 2.3.1-p6 to 2.3.2

#8 Updated by Daniel Hoffend almost 3 years ago

I've pushed a hotfix for this commit. Somehow i checked the wrong variable ... Please check

https://github.com/pfsense/pfsense/pull/3077

#9 Updated by Renato Botelho almost 3 years ago

  • Status changed from Resolved to Feedback
  • Target version changed from 2.3.2 to 2.3.2-p1

PR has been merged, thanks!

#10 Updated by Renato Botelho almost 3 years ago

  • Assignee set to Renato Botelho

#11 Updated by Jim Pingle over 2 years ago

  • Status changed from Feedback to Resolved

Also available in: Atom PDF