diff options
author | Thomas Haller <thaller@redhat.com> | 2017-09-02 16:56:27 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-09-08 11:05:04 +0200 |
commit | b3254da173f5c91d9e9e2fb042d03ea9c19fe774 (patch) | |
tree | 118e72c258766aa6df30a7bd840af1a4a37b788d | |
parent | 5c7e0654ebc64bc84b18f66854686f896d18e4ca (diff) | |
download | NetworkManager-b3254da173f5c91d9e9e2fb042d03ea9c19fe774.tar.gz |
platform/trivial: add code comments
-rw-r--r-- | src/platform/nm-platform.c | 4 | ||||
-rw-r--r-- | src/platform/nm-platform.h | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/platform/nm-platform.c b/src/platform/nm-platform.c index 7e91b7547d..1b47702cc6 100644 --- a/src/platform/nm-platform.c +++ b/src/platform/nm-platform.c @@ -3778,6 +3778,10 @@ _ip_route_scope_inv_get_normalized (const NMPlatformIP4Route *route) * Adding a route to kernel via nm_platform_ip_route_add() will normalize/coerce some * properties of the route. This function modifies (normalizes) the route like it * would be done by adding the route in kernel. + * + * Note that this function is related to NM_PLATFORM_IP_ROUTE_CMP_TYPE_SEMANTICALLY + * in that if two routes compare semantically equal, after normalizing they also shall + * compare equal with NM_PLATFORM_IP_ROUTE_CMP_TYPE_FULL. */ void nm_platform_ip_route_normalize (int addr_family, diff --git a/src/platform/nm-platform.h b/src/platform/nm-platform.h index b29e6668d2..a703d4c879 100644 --- a/src/platform/nm-platform.h +++ b/src/platform/nm-platform.h @@ -138,7 +138,10 @@ typedef enum { * a route destination 192.168.1.5/24 is not accepted by kernel and * we treat it identical to 192.168.1.0/24. Semantically these * routes are identical, but NM_PLATFORM_IP_ROUTE_CMP_TYPE_FULL will - * report them as different. */ + * report them as different. + * + * The result shall be identical to call first nm_platform_ip_route_normalize() + * on both routes and then doing a full comparison. */ NM_PLATFORM_IP_ROUTE_CMP_TYPE_SEMANTICALLY, /* compare all fields. This should have the same effect as memcmp(), |