mirror of
https://gitlab.labs.nic.cz/labs/bird.git
synced 2024-05-11 16:54:54 +00:00
Babel: Seqno requests are properly decoupled from neighbors when the underlying interface disappears
When an interface disappears, all the neighbors are freed as well. Seqno requests were anyway not decoupled from them, leading to strange segfaults. This fix adds a proper seqno request list inside neighbors to make sure that no pointer to neighbor is kept after free.
This commit is contained in:
@@ -198,7 +198,6 @@ struct babel_neighbor {
|
||||
struct babel_iface *ifa;
|
||||
|
||||
ip_addr addr;
|
||||
uint uc; /* Reference counter for seqno requests */
|
||||
u16 rxcost; /* Sent in last IHU */
|
||||
u16 txcost; /* Received in last IHU */
|
||||
u16 cost; /* Computed neighbor cost */
|
||||
@@ -212,6 +211,7 @@ struct babel_neighbor {
|
||||
btime ihu_expiry;
|
||||
|
||||
list routes; /* Routes this neighbour has sent us (struct babel_route) */
|
||||
list requests; /* Seqno requests bound to this neighbor */
|
||||
};
|
||||
|
||||
struct babel_source {
|
||||
@@ -241,6 +241,7 @@ struct babel_route {
|
||||
|
||||
struct babel_seqno_request {
|
||||
node n;
|
||||
node nbr_node;
|
||||
u64 router_id;
|
||||
u16 seqno;
|
||||
u8 hop_count;
|
||||
|
||||
Reference in New Issue
Block a user