1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-24 22:13:52 +01:00

shell fib: recognize the default route as net prefix

This commit is contained in:
BytesGalore 2016-01-06 15:51:44 +01:00
parent a39862b5a6
commit b8ba3f589f

View File

@ -101,6 +101,16 @@ static void _fib_add(const char *dest, const char *next, kernel_pid_t pid, uint3
nxt_size = INADDRSZ;
}
/* Set the prefix flag for a network */
dst_flags |= FIB_FLAG_NET_PREFIX;
for (size_t i = 0; i < dst_size; ++i) {
if (dst[i] != 0) {
/* and clear the bit if its not the default route */
dst_flags = (dst_flags & ~FIB_FLAG_NET_PREFIX);
break;
}
}
fib_add_entry(&gnrc_ipv6_fib_table, pid, dst, dst_size, dst_flags, nxt,
nxt_size, nxt_flags, lifetime);
}