Skip to content

Commit

Permalink
Merge pull request #76 from mwhudson/del-link-segfault
Browse files Browse the repository at this point in the history
fix segfault when a netdev disappears
  • Loading branch information
xnox authored Dec 11, 2019
2 parents ce784ff + 010f80e commit 4c3ab9b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions probert/_rtnetlinkmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ static void observe_link_change(
int is_vlan, ifindex;
unsigned int flags;

if (act == NL_ACT_DEL) {
link = old_link;
}

is_vlan = rtnl_link_is_vlan(link);
ifindex = rtnl_link_get_ifindex(link);
flags = rtnl_link_get_flags(link);
Expand Down

0 comments on commit 4c3ab9b

Please sign in to comment.