mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-04 05:10:17 +01:00
2006-08-24 Dan Williams <dcbw@redhat.com>
Patch from Ed Catmur: * src/NetworkManagerUtils.c - (nm_utils_ip4_netmask_to_prefix): don't infinitely loop if netmask is 0 (Gnome #352634) git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1987 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
8d7dd626ab
commit
1e28384c62
2 changed files with 9 additions and 0 deletions
|
|
@ -1,3 +1,10 @@
|
|||
2006-08-24 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
Patch from Ed Catmur:
|
||||
* src/NetworkManagerUtils.c
|
||||
- (nm_utils_ip4_netmask_to_prefix): don't infinitely loop
|
||||
if netmask is 0 (Gnome #352634)
|
||||
|
||||
2006-08-17 Robert Love <rml@novell.com>
|
||||
|
||||
* src/backends/NetworkManagerSuSE.c: Do not restart ypbind; our ypbind
|
||||
|
|
|
|||
|
|
@ -707,6 +707,8 @@ int nm_utils_ip4_netmask_to_prefix (guint32 ip4_netmask)
|
|||
{
|
||||
int i = 1;
|
||||
|
||||
g_return_val_if_fail (ip4_netmask != 0, 0);
|
||||
|
||||
/* Just count how many bit shifts we need */
|
||||
ip4_netmask = ntohl (ip4_netmask);
|
||||
while (!(ip4_netmask & 0x1) && ++i)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue