Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 May 2010 15:50:19 GMT
From:      John Bayly <john.bayly@tipstrade.net>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/146377: Interface doesn't clear addresses when PPPoE connection closes
Message-ID:  <201005071550.o47FoJRs076892@www.freebsd.org>
Resent-Message-ID: <201005071600.o47G0Ak9018881@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         146377
>Category:       bin
>Synopsis:       Interface doesn't clear addresses when PPPoE connection closes
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 07 16:00:10 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     John Bayly
>Release:        7.2-RELEASE
>Organization:
TipsTrade
>Environment:
FreeBSD router.tipstrade.net 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Tue Oct  6 11:49:42 BST 2009     xxx@router.tipstrade.net:/usr/obj/usr/src/sys/CUSTOM20091006  i386
>Description:
When using ppp to create an ADSL connection, the addresses for the tun interface aren't removed when either the connection drops (due to LCP/LQM echoes being lost), or when the connection is closed.

This means that even though a connection has been dropped, using ifconfig to check the state makes it appear as if a connection is still up.

When settings "set log +all", I've seen that the ioctl calls to remove the address (SIOCDIFADDR) is never called. Calling "iface clear" in ppp.linkdown doesn't work either, as it's executed before the connection has closed so the address cannot be removed.

I've confirmed this from looking at the ppp source: iface_Clear is only called from the following places:
1). ipcp_SetIPaddress & ipcp_SetIPv6address
2). IfaceClearCommand ie. the interactive command "iface clear"
3). bundle_destroy, which is in turn called solely from AbortProgram

Would it make sense to add a call to iface_Clear somewhere in bundle_close? Apologies for the vagueness, but I'm still getting my head around the code here.
>How-To-Repeat:
1). Open ppp in interactive mode
2). ppp> dial
3). PPP> iface show
4). PPP> close
5). ppp> iface show
6). ppp> iface clear
7). ppp> iface show

>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201005071550.o47FoJRs076892>