From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: network@lists.ipfire.org Subject: Re: [PATCH] dhclient-script: fix bound Date: Mon, 22 Jan 2018 13:08:59 +0000 Message-ID: <1516626539.3647.171.camel@ipfire.org> In-Reply-To: <1516473057.2816.0@mail01.ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8079364626754157718==" List-Id: --===============8079364626754157718== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi, I don't know why this hasn't been merged. It is a bit hacky and I cannot remember if I wanted it to be reworked or so. I merged it now because it is good enough for now and we probably need to refactor the dhclient-script at some time. Best, -Michael On Sat, 2018-01-20 at 19:30 +0100, Jonatan Schlag wrote: > Hi > Why was that patch not merged? I just searched for this patch and cloud not > find him. >=20 > Am Mo, 28. Aug, 2017 um 3:27 schrieb Jonatan Schlag >: > > When we get a BOUND we should have only new_* variables set. > > So it is stated in the manpage. > > Apparently, also old_* variables are set so we never got into the block > > where the IP address was set. > > We now always set a new IP Address when we get a BOUND. > >=20 > > Fixes: #11363 > >=20 > > Signed-off-by: Jonatan Schlag > > --- > > src/dhclient-script | 6 ++++-- > > 1 file changed, 4 insertions(+), 2 deletions(-) > >=20 > > diff --git a/src/dhclient-script b/src/dhclient-script > > index c2e0678..ec990bf 100644 > > --- a/src/dhclient-script > > +++ b/src/dhclient-script > > @@ -197,7 +197,8 @@ case "${reason}" in > > =20 > > BOUND|RENEW|REBIND|REBOOT) > > # Check if the IP address has changed. If so, delete all > > routes and stuff. > > - if [ -n "${old_ip_address}" -a "${old_ip_address}" !=3D > > "${new_ip_address}" ]; then > > + if [ -n "${old_ip_address}" -a "${old_ip_address}" !=3D > > "${new_ip_address}" ] || \ > > + [ "${reason}" =3D "BOUND" ]; then > > ipv4_flush_device ${interface} > > fi > > =20 > > @@ -208,7 +209,8 @@ case "${reason}" in > > [ ! "${old_network_number}" =3D > > "${new_network_number}" ] || \ > > [ ! "${old_broadcast_address}" =3D > > "${new_broadcast_address}" ] || \ > > [ ! "${old_routers}" =3D > > "${new_routers}" ] || \ > > - [ ! "${old_interface_mtu}" =3D > > "${new_interface_mtu}" ]; then > > + [ ! "${old_interface_mtu}" =3D > > "${new_interface_mtu}" ] || \ > > + [ "${reason}" =3D "BOUND" ]; then > > =20 > > =20 > > # Calc the prefix from the subnet > > mask > > --=20 > > 2.6.3 > >=20 --===============8079364626754157718== Content-Type: application/pgp-signature Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="signature.asc" MIME-Version: 1.0 LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0KCmlRSXpCQUFCQ2dBZEZpRUU1L3JXNWwzR0dl Mnlwa3R4Z0hudy8yK1FDUWNGQWxwbDRtc0FDZ2tRZ0hudy8yK1EKQ1FjTE1RLy9kdVFDWWs1NEk1 azZtUDhwSW40bndqb3lPMkhTa3R5cFNEN3V4SnBMc0k2cWpMS0cwRG5oTWtnOApHRlp5WGR3NW9t TTFrQ1Fva3c4S1J5OUhwZElQRVZhTlhSWTJUSWk1MHZIQURqRVhpWDlLKzFiTkFVSnlKYXhuCmht bGFNUkFDWDlodFBmSWxjWGhId21WbXVBbWt0NWFlbmQxb25WQUtUbDd0Z24yT1lZTkhUckI0S1VL TkRVUVMKT2d3V0wzSWFlZFhSQXYwZnZFUnpBSXdneExVUmJ6U3VDS0I2OVZHbzk2OWdzS0tGVGV2 TEEzdVBIdGV4OTRFMwpqajAwdWdmRHpwVTc4T2hXZ05aQUp5d3I4dmxJWlpHSklIUlhvQVVQZWpN TWxpaW80ZXdmcWNYUzBVRDB0OWU4CnhEenRaRUF3STFnZXNrdUZBbkc1OXJWZ1BHM0c3ZEZ4TS9p d1pmS2t1UG51b2RwY1hHSnllZHBlZk5SSGVyR00KZlJ2TWRDNW54MGY3emVuZ3MySG5WTXd2akhT ZENMdTlOVldiQWFDcHJqRmVrZlBMWFFocE1vYjJma2xvKytoRwpVR0paK3pCbW5YRHNjS0ZWWDNp REFmY3p3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