summaryrefslogtreecommitdiffstats
path: root/pimd/pim_sock.c
diff options
context:
space:
mode:
authorSatheesh Kumar K <sathk@cumulusnetworks.com>2019-09-24 05:45:05 +0200
committerSatheesh Kumar K <sathk@cumulusnetworks.com>2019-09-24 08:03:12 +0200
commit9036d0ef1a7156780cf2c3118001144751dacc8c (patch)
tree90df54337efa3de19d55ee382ced91b8543fae98 /pimd/pim_sock.c
parentMerge pull request #5034 from opensourcerouting/rm-topotest-cruft (diff)
downloadfrr-9036d0ef1a7156780cf2c3118001144751dacc8c.tar.xz
frr-9036d0ef1a7156780cf2c3118001144751dacc8c.zip
pimd: Mark Default TOS Values for PIM & IGMP Outgoing packets
This will facilitate the Hardware to prefer control packets over Normal Data packets while queuing, so that during congestion, the chance of dropping control packet will be minimised. Signed-off-by: Satheesh Kumar K <sathk@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_sock.c')
-rw-r--r--pimd/pim_sock.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/pimd/pim_sock.c b/pimd/pim_sock.c
index 82255cd3b..7f03e1838 100644
--- a/pimd/pim_sock.c
+++ b/pimd/pim_sock.c
@@ -255,6 +255,12 @@ int pim_socket_mcast(int protocol, struct in_addr ifaddr, struct interface *ifp,
}
}
+ /* Set Tx socket DSCP byte */
+ if (setsockopt_ipv4_tos(fd, IPTOS_PREC_INTERNETCONTROL)) {
+ zlog_warn("can't set sockopt IP_TOS to PIM/IGMP socket %d: %s",
+ fd, safe_strerror(errno));
+ }
+
return fd;
}