Skip to content

Commit

Permalink
inetaddr: enable INET_ADDR_LOCK to avoid crash when restarting keepal…
Browse files Browse the repository at this point in the history
…ived

When restarting keepalived, session may lookup the deleting local address.
In this case, dpvs would crash. Put read lock on inetaddr, and no obvious
performance decrease found by the stress test.
  • Loading branch information
ywc689 committed Jun 12, 2018
1 parent 967ec37 commit 6ab9a10
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/inetaddr.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

#define IFA
#define RTE_LOGTYPE_IFA RTE_LOGTYPE_USER1
#define INET_ADDR_LOCK

#define INET_ADDR_HSIZE_SHIFT 8
#define INET_ADDR_HSIZE (1U << INET_ADDR_HSIZE_SHIFT)
Expand Down

0 comments on commit 6ab9a10

Please sign in to comment.