diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-05-18 02:33:43 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-05-18 02:33:43 +0200 |
commit | 4a07939b68450a2fa4dbf808316da5cc3149d754 (patch) | |
tree | 65836664e58ca6938374be7283cc671de626847c /pimd/pim_ssmpingd.c | |
parent | Merge pull request #537 from donaldsharp/vrf_stuff (diff) | |
download | frr-4a07939b68450a2fa4dbf808316da5cc3149d754.tar.xz frr-4a07939b68450a2fa4dbf808316da5cc3149d754.zip |
pimd: Thread changes allow pim to crash a boo
When we add a thread pointer to thread_add_XXX functions
when the specified function is called, thread.c is setting
the thread pointer to NULL. This was causing pim to
liberally pull it's zassert grenade pin's.
Additionally clean up code to not set the NULL pointer.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_ssmpingd.c')
-rw-r--r-- | pimd/pim_ssmpingd.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/pimd/pim_ssmpingd.c b/pimd/pim_ssmpingd.c index 1249e0ee5..c907d66d5 100644 --- a/pimd/pim_ssmpingd.c +++ b/pimd/pim_ssmpingd.c @@ -316,12 +316,10 @@ static int ssmpingd_sock_read(struct thread *t) ss = THREAD_ARG(t); sock_fd = THREAD_FD(t); - zassert(sock_fd == ss->sock_fd); result = ssmpingd_read_msg(ss); /* Keep reading */ - ss->t_sock_read = 0; ssmpingd_read_on(ss); return result; @@ -329,7 +327,6 @@ static int ssmpingd_sock_read(struct thread *t) static void ssmpingd_read_on(struct ssmpingd_sock *ss) { - zassert(!ss->t_sock_read); thread_add_read(master, ssmpingd_sock_read, ss, ss->sock_fd, &ss->t_sock_read); } @@ -370,7 +367,7 @@ static struct ssmpingd_sock *ssmpingd_new(struct in_addr source_addr) } ss->sock_fd = sock_fd; - ss->t_sock_read = 0; + ss->t_sock_read = NULL; ss->source_addr = source_addr; ss->creation = pim_time_monotonic_sec(); ss->requests = 0; |