Bug 43745

Summary: Cannot use pppctl(8) on a ppp socket opened before an unclean reboot
Product: Base System Reporter: Barnaba Marcello <l.barnaba>
Component: miscAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.6-STABLE   
Hardware: Any   
OS: Any   

Description Barnaba Marcello 2002-10-06 17:20:09 UTC
When the system is rebooted uncleanly (e.g., power failure), and you configured ppp(8) with set server=/path/to/ppp_socket, this socket won`t be unlinked by ppp.

So, when you power on the machine, the socket is already in place, ppp can`t bind it (Address already in use) and you cannot use pppctl, unless you manually remove the socket and restart ppp.

Fix: 

Add this line to /etc/rc.network:279
rm -f /etc/ppp/pppctl

A better solution would be to put PPP_SOCKET=/etc/ppp/pppctl in /etc/rc.conf and rm -f $PPP_SOCKET in /etc/rc.network:279
How-To-Repeat: * Add this line in your ppp.conf: set server=/etc/ppp/pppctl
* Start ppp.
* Unplug the power cable of the machine.
* When you restart it and run ppp, it will be unable to bind the socket.
Comment 1 Tom Hukins freebsd_committer freebsd_triage 2002-11-20 15:21:53 UTC
State Changed
From-To: open->feedback

conf/45226 is a duplicate report of this bug but also contains a patch. 
Are you happy for me to close your PR as the newer report contains more 
information?
Comment 2 Tom Hukins freebsd_committer freebsd_triage 2002-11-26 21:47:21 UTC
State Changed
From-To: feedback->closed

conf/45226 contains a more detailed analysis of this problem. 

Thanks for reporting this.