From b644259ff26970b841479a4e881303ad49e81abe Mon Sep 17 00:00:00 2001 From: Pavithra Ramesh Date: Sat, 20 Jul 2013 07:17:47 +0000 Subject: [PATCH] BFD: Populate ToS field in BFD packets. Signed-off-by: Pavithra Ramesh Signed-off-by: Ethan Jackson Acked-by: Ethan Jackson --- lib/bfd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/bfd.c b/lib/bfd.c index f2d4b9c17..9099a2c0f 100644 --- a/lib/bfd.c +++ b/lib/bfd.c @@ -16,6 +16,7 @@ #include "bfd.h" #include +#include #include "byte-order.h" #include "csum.h" @@ -56,9 +57,7 @@ VLOG_DEFINE_THIS_MODULE(bfd); * * - Unit tests. * - * - BFD show into ovs-bugtool. - * - * - Set TOS/PCP on inner BFD frame, and outer tunnel header when encapped. + * - Set TOS/PCP on the outer tunnel header when encapped. * * - Sending BFD messages should be in its own thread/process. * @@ -437,7 +436,8 @@ bfd_put_packet(struct bfd *bfd, struct ofpbuf *p, ip = ofpbuf_put_zeros(p, sizeof *ip); ip->ip_ihl_ver = IP_IHL_VER(5, 4); ip->ip_tot_len = htons(sizeof *ip + sizeof *udp + sizeof *msg); - ip->ip_ttl = 255; + ip->ip_ttl = MAXTTL; + ip->ip_tos = IPTOS_LOWDELAY | IPTOS_THROUGHPUT; ip->ip_proto = IPPROTO_UDP; ip->ip_src = htonl(0xA9FE0100); /* 169.254.1.0 Link Local. */ ip->ip_dst = htonl(0xA9FE0101); /* 169.254.1.1 Link Local. */ -- 2.43.0