Revert "interface: warn if ip6hint is truncated"
authorJo-Philipp Wich <jo@mein.io>
Wed, 4 Dec 2019 20:05:12 +0000 (21:05 +0100)
committerJo-Philipp Wich <jo@mein.io>
Wed, 4 Dec 2019 20:05:20 +0000 (21:05 +0100)
This reverts commit e45b1408284c05984b38a910a1f0a07d6c761397.

Reverting the commit as the submitters Signed-off-by has been mistakingly
added without the authors consent.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
interface.c

index 2fa0613167ad82e4ff9db79aa7c415fd27c51a05..028dc6ccd5e53fd26ffe498699ba6621461311b9 100644 (file)
@@ -863,15 +863,9 @@ interface_alloc(const char *name, struct blob_attr *config, bool dynamic)
        }
 
        iface->assignment_hint = -1;
-       if ((cur = tb[IFACE_ATTR_IP6HINT])) {
-               int32_t assignment_hint = strtol(blobmsg_get_string(cur), NULL, 16);
-
-               iface->assignment_hint = assignment_hint & ~((1 << (64 - iface->assignment_length)) - 1);
-
-               if (iface->assignment_hint != assignment_hint)
-                       netifd_log_message(L_WARNING, "Using truncated assignment hint %d (0x%x) for interface '%s'\n",
-                                          iface->assignment_hint, iface->assignment_hint, iface->name);
-       }
+       if ((cur = tb[IFACE_ATTR_IP6HINT]))
+               iface->assignment_hint = strtol(blobmsg_get_string(cur), NULL, 16) &
+                               ~((1 << (64 - iface->assignment_length)) - 1);
 
        if ((cur = tb[IFACE_ATTR_IP6CLASS]))
                interface_add_assignment_classes(iface, cur);