bin/146377: [ppp] [tun] Interface doesn't clear addresses when
PPPoE connection closes
John Bayly
john.bayly at tipstrade.net
Mon May 10 14:10:05 UTC 2010
The following reply was made to PR bin/146377; it has been noted by GNATS.
From: John Bayly <john.bayly at tipstrade.net>
To: bug-followup at FreeBSD.org, john.bayly at tipstrade.net
Cc:
Subject: Re: bin/146377: [ppp] [tun] Interface doesn't clear addresses when
PPPoE connection closes
Date: Mon, 10 May 2010 14:49:04 +0100
This is a multi-part message in MIME format.
--------------090209090702000507070503
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Having had a good look at the source over the weekend (Spanish Grand
Prix was dull as ever), I've seen that my suggestion of putting a call
to iface_Clear somewhere in bundle_close was a tad off the mark.
Noticing that the calls to iface_Add & iface_Clear appear to come from
ipcp & ipv6cp (makes sense really) it's clear that the call to clear the
interface's addresses should come from there too.
Also, the call to clear should be made at the last possible moment, to
make sure that connection is definitely closed, so I add the call in the
LayerFinish method for both ipcp & ipv6cp. I've attached diffs for both
files.
I've tested the patched version, and by calling close in interactive
mode, and by disconnecting the phone cable (so that the connection will
drop after 5 LCP echoes are lost) I now have the desired effect of the
addresses being cleared from the interface.
I'm going to run with this patched version as I can't see how this could
cause any catastrophic issues. Would this be an acceptable solution for
future releases?
John
--------------090209090702000507070503
Content-Type: text/plain;
name="ipcp.c.diff"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="ipcp.c.diff"
LS0tIGlwY3AuYy5vcmlnIDIwMTAtMDUtMTAgMTM6Mjc6MjIuMDAwMDAwMDAwICswMTAwDQor
KysgaXBjcC5jICAgICAgMjAxMC0wNS0xMCAxMzo0MjoyMy4wMDAwMDAwMDAgKzAxMDANCkBA
IC0yNSw3ICsyNSw3IEBADQogICogT1VUIE9GIFRIRSBVU0UgT0YgVEhJUyBTT0ZUV0FSRSwg
RVZFTiBJRiBBRFZJU0VEIE9GIFRIRSBQT1NTSUJJTElUWSBPRg0KICAqIFNVQ0ggREFNQUdF
Lg0KICAqDQotICogJEZyZWVCU0Q6IHNyYy91c3Iuc2Jpbi9wcHAvaXBjcC5jLHYgMS4xMjMu
MjAuMSAyMDA5LzA0LzE1IDAzOjE0OjI2IGtlbnNtaXRoIEV4cCAkDQorICogJEZyZWVCU0Q6
IHNyYy91c3Iuc2Jpbi9wcHAvaXBjcC5jLHYgMS4xMjMuMjAuMS4xIDIwMTAvMDUvMTAgMTM6
NDM6MDAgam9obmJheWx5IEV4cCAkDQogICovDQoNCiAjaW5jbHVkZSA8c3lzL3BhcmFtLmg+
DQpAQCAtODI5LDYgKzgyOSwxMCBAQA0KICAgLyogV2UncmUgbm93IGRvd24gKi8NCiAgIHN0
cnVjdCBpcGNwICppcGNwID0gZnNtMmlwY3AoZnApOw0KDQorICAvKiBDbGVhciBhbGwgYWRk
cmVzc2VzIGZyb20gdGhlIGludGVyZmFjZSAqLw0KKyAgaWZhY2VfQ2xlYXIoZnAtPmJ1bmRs
ZS0+aWZhY2UsICZmcC0+YnVuZGxlLT5uY3AsIEFGX0lORVQsDQorICAgICAgICAgICAgICAg
ICAgIElGQUNFX0NMRUFSX0FMTCk7DQorDQogICBsb2dfUHJpbnRmKExvZ0lQQ1AsICIlczog
TGF5ZXJGaW5pc2guXG4iLCBmcC0+bGluay0+bmFtZSk7DQogICB0aHJvdWdocHV0X3N0b3Ao
JmlwY3AtPnRocm91Z2hwdXQpOw0KICAgdGhyb3VnaHB1dF9sb2coJmlwY3AtPnRocm91Z2hw
dXQsIExvZ0lQQ1AsIE5VTEwpOw==
--------------090209090702000507070503
Content-Type: text/plain;
name="ipv6cp.c.diff"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="ipv6cp.c.diff"
LS0tIGlwdjZjcC5jLm9yaWcgICAgICAgMjAxMC0wNS0xMCAxMzoyOTo0OC4wMDAwMDAwMDAg
KzAxMDANCisrKyBpcHY2Y3AuYyAgICAyMDEwLTA1LTEwIDEzOjQzOjA5LjAwMDAwMDAwMCAr
MDEwMA0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