[PATCH] Fix crash while parsing ntp servers from DHCP6 (#969303)
Martin Kolman
mkolman at redhat.com
Wed Jul 24 13:48:35 UTC 2013
On Wed, 2013-07-24 at 09:35 -0400, David Shea wrote:
> Forgot, this would also be for rhel7-branch. I'll clone the bug and push
> to rhel7-branch and master.
Ah, OK, thanks!
>
> On 07/23/2013 04:29 PM, David Shea wrote:
> > This removes anaconda's attempt to collect NTP servers through
> > NetworkManager's DHCP6 options. The reasons for this are as follows:
> >
> > - NetworkManager does not currently request NTP or SNTP options. When
> > using a DHCP6 that honors OPTION_ORO (e.g., ISC dhcpd6), no time
> > servers will be returned
> > - dhclient does not support the NTP server option (dhcp6 option 56,
> > RFC 5908). If a server does return an OPTION_NTP_SERVER block, it
> > will not be parsed and NetworkManager will only be aware of the
> > presence of an unknown option 56.
> >
> > It is possible to use the OPTION_SNTP_SERVER data, which is formated in
> > the same way the IPv4 DHCP NTP server option data. To use this we would
> > need to create /etc/NetworkManager/dhclient6.conf containing "also
> > request dhcp6.sntp-servers" and fix the option parsing code in nm.py to
> > pull the right value out of the Dhcp6Config.Options dictionary. However,
> > it's probably not worth it, since obviously no one was using DHCP6
> > options at all, because it would have crashed.
> > ---
> > pyanaconda/nm.py | 10 +---------
> > 1 file changed, 1 insertion(+), 9 deletions(-)
> >
> > diff --git a/pyanaconda/nm.py b/pyanaconda/nm.py
> > index 0932a2e..56c59d4 100644
> > --- a/pyanaconda/nm.py
> > +++ b/pyanaconda/nm.py
> > @@ -284,15 +284,7 @@ def nm_ntp_servers_from_dhcp():
> > for ip in ntp_servers_string.split(" "):
> > ntp_servers.append(ip)
> >
> > - # harvest NTP servers from DHCPv6
> > - dhcp6_path = nm_device_property(device, "Dhcp6Config")
> > - dhcp6_proxy = _get_proxy(object_path=dhcp6_path,
> > - interface_name="org.freedesktop.NetworkManager.DHCP6Config")
> > - options = dhcp6_proxy.get_cached_property("Options")
> > - if options is not None:
> > - # NTP server addresses returned by DHCP are whitespace delimited
> > - for ip in options.unpack().split(" "):
> > - ntp_servers.append(ip)
> > + # NetworkManager does not request NTP/SNTP options for DHCP6
> > return ntp_servers
> >
> > def _device_settings(name):
>
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
More information about the anaconda-patches
mailing list