commit 334c3c10032a69894f04415ef0c56b55754e57a3
parent 32c3da8225f509a8f82994802dd9662e787eb210
Author: Yersa Nordman <yersa@finwo.nl>
Date: Tue, 21 Feb 2023 23:24:31 +0100
More debug prints throughout rt update
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/main.c b/src/main.c
@@ -118,19 +118,23 @@ void * thread_iface(void *arg) {
while(iface_list_entry) {
iface_list_entry = rt_entry->interfaces[++iface_list_len];
}
+ printf(" len before: %d\n", iface_list_len);
// }}}
// Realloc list to have the expanded length {{{
rt_entry->interfaces = realloc(rt_entry->interfaces, (iface_list_len+2) * sizeof(struct pm_rt_entry *));
+ printf(" reallocated");
// }}}
// Actually add receiving interface to the known interfaces for the mac address {{{
rt_entry->interfaces[iface_list_len ] = iface;
rt_entry->interfaces[iface_list_len+1] = NULL;
+ printf(" len after: %d\n", iface_list_len+1);
// }}}
// }}}
// Save rt entry in the routing table again
btree_set(iface->bond->rt, rt_entry);
+ printf(" saved to tree\n");
printf("\n");
// TODO: update routing table