xapi-project / xcp-networkd

The XCP networking daemon
Other
14 stars 42 forks source link

CA-244087: Update dhclient interface conf on changing default gateway. #106

Closed sharady closed 7 years ago

sharady commented 7 years ago

xcp-networkd must stop and start the dhclient for the interface if default gateway has changed.

Example: 1) If default gateway is xenbr0 - Its conf file will keep this gateway information. 2) Switch the default gateway to xenbr1 - Its conf file will be created with gateway information. 3) Switch the default gateway back to xenbr0 then dhclient won't get restarted.

Reason: 1) While switching default gateway from xenbr0 to xenbr1, gateway information from xenbr0 conf file was not removed. 2) On switching default gateway from xenbr1 to xenbr0, xcp-networkd found no diff in conf file hence not retarted the dhclient for xenbr0.

It resulted default gateway still pointed to xenbr1.

Signed-off-by: sharad yadav sharad.yadav@citrix.com

sharady commented 7 years ago

Reviewed @ https://github.com/xapi-project/xcp-networkd/pull/103

sharady commented 7 years ago

@robhoes thanks for the review, I have created this PR for master now