ppp not removing address when down

Using ppp on FreeBSD 7.2-RELEASE. Got this immensely annoying issue that when the ADSL connection drops the IP address isn't being removed from the tun interface, making it look like the connection is still up.

I've tries this in interactive mode:
Code:
Using interface: tun0
ppp ON router> dial
ppp ON router>
Ppp ON router>
PPp ON router> Warning: ff02:7::/32: Change route failed: errno: Network is unreachable
PPP ON router> iface show
tun0 (idx 7) <UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1492 has 1 address:
  inet 81.134.xx.xx --> 81.134.yy.yy netmask 0xffffffff
PPP ON router> close
PPp ON router> Warning: ff02:7::/32: Change route failed: errno: Network is unreachable
ppp ON router>
ppp ON router> iface show
tun0 (idx 7) <POINTOPOINT,RUNNING,MULTICAST> mtu 1500 has 1 address:
  inet 81.134.xx.xx --> 81.134.yy.yy netmask 0xffffffff
ppp ON router> iface clear
ppp ON router> iface show
tun0 (idx 7) <POINTOPOINT,RUNNING,MULTICAST> mtu 1500 has 0 addresses:
ppp ON router>

As you can see, the interface comes up with an address when I dial, however when I close the connection, the interface still shows the address, it's only when I call iface clear that the address is removed.

I added the the following to my /etc/ppp/ppp.linkdown, but it makes no difference. This is because ppp is still in OPENED state (as per the man page: all addresses except for the NCP negotiated address are deleted from the interface.)
Code:
bt:
        # Clear the addresses
        iface clear

Am I missing something in /etc/ppp/ppp.conf that tells ppp to remove the address when a connection is down?

Many thanks,
John
 
After getting no responses from the mailing list, I posted a PR #146377 for the issue. I've also now posted two diffs to correct the issue, by forcing the addresses to be cleared when an IPv4 or IPv6 connection is finished.

I'm going to run this setup and see if it causes any catastrophic issues, though I can't really see it happening.
 
Back
Top