[riot-notifications] [RIOT-OS/RIOT] shell/sc_gnrc_ipv6_nib: extend for ABR (#10951)

benpicco notifications at github.com
Wed Sep 11 23:42:36 CEST 2019


benpicco commented on this pull request.



> +    }
+    else if ((argc > 3) && (strcmp(argv[2], "add") == 0)) {
+        gnrc_netif_t *netif;
+        ipv6_addr_t addr = IPV6_ADDR_UNSPECIFIED;
+
+        if (ipv6_addr_from_str(&addr, argv[3]) == NULL) {
+            _usage_nib_abr(argv);
+            return 1;
+        }
+        /* check addr */
+        if (ipv6_addr_is_link_local(&addr)) {
+            printf("address %s must be global\n", argv[3]);
+            return 1;
+        }
+        if (((netif = gnrc_netif_get_by_ipv6_addr(&addr)) == NULL) ||
+            gnrc_netif_is_6lbr(netif)) {

Yes I know. I just think it's easier to process mentally if it's if (condition A or nor condition B) than when it's if (not (condition A and condition B)).

But that's your module, so if you like it better that way I won't object - feel free to squash. :)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/10951#discussion_r323472954
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190911/81c7e7ab/attachment-0001.htm>


More information about the notifications mailing list