Re: Change in UUID format breaks connections on upgrades

On Thu, Sep 5, 2013 at 4:05 PM, Dan Williams <dcbw redhat com> wrote:
Looks like 74b6b9c768338ce3cd58d781fd837e6abbf3e209 is to blame;
previously the function didn't count the number of dashes, but now it
does.  I guess I'd be fine with changing the check at the end of
nm_utils_is_uuid() to:

if ((num_dashes == 4) && (p - str == 36))
        return TRUE;
/* Backwards compat for older configurations */
if ((num_dashes == 0) && (p - str == 32))
        return TRUE;
return FALSE;

It also wouldn't hurt to have a testcase in
libnm-util/tests/test-general.c that creates a new NMSettingConnection
and sets the UUID to the old format and ensures that nm_setting_verify()
still works.

Thanks, that sounds good. I wrote the test and made that change.

I will test it on Saturday then send a patch.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]