diff options
author | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2018-08-29 20:17:49 +0200 |
---|---|---|
committer | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2018-09-03 15:41:33 +0200 |
commit | 2f11c53f550a07970b73344985202d5ade4e353a (patch) | |
tree | 865eaa814ae6878e853ff024c7386355273b6b4c /bfdd/bfdd.c | |
parent | bfdd: enumerate all diagnositic codes (diff) | |
download | frr-2f11c53f550a07970b73344985202d5ade4e353a.tar.xz frr-2f11c53f550a07970b73344985202d5ade4e353a.zip |
bfdd: use UDP sockets instead of raw
Avoid all complexities of handling ethernet/IP/UDP headers and just use
UDP sockets: let the OS kernel handle this task.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Diffstat (limited to 'bfdd/bfdd.c')
-rw-r--r-- | bfdd/bfdd.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bfdd/bfdd.c b/bfdd/bfdd.c index 9c75e103e..250f8d21c 100644 --- a/bfdd/bfdd.c +++ b/bfdd/bfdd.c @@ -158,7 +158,8 @@ static void bg_init(void) bglobal.bg_mhop = bp_udp_mhop(); bglobal.bg_shop6 = bp_udp6_shop(); bglobal.bg_mhop6 = bp_udp6_mhop(); - bglobal.bg_echo = ptm_bfd_echo_sock_init(); + bglobal.bg_echo = bp_echo_socket(); + bglobal.bg_echov6 = bp_echov6_socket(); } int main(int argc, char *argv[]) @@ -219,6 +220,8 @@ int main(int argc, char *argv[]) &bglobal.bg_ev[3]); thread_add_read(master, bfd_recv_cb, NULL, bglobal.bg_echo, &bglobal.bg_ev[4]); + thread_add_read(master, bfd_recv_cb, NULL, bglobal.bg_echov6, + &bglobal.bg_ev[5]); thread_add_read(master, control_accept, NULL, bglobal.bg_csock, &bglobal.bg_csockev); |