From 50aa824955f4311ecdc302cf17976bddbd2aa2b2 Mon Sep 17 00:00:00 2001 From: Peter Hessler Date: Sun, 22 Jan 2017 00:39:46 +0000 Subject: set the TOS/ECN field to Internetwork Control, since that is exactly what we are doing --- sys/net/bfd.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/sys/net/bfd.c b/sys/net/bfd.c index dacc735ddc0..250d5a690c1 100644 --- a/sys/net/bfd.c +++ b/sys/net/bfd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bfd.c,v 1.54 2017/01/21 10:15:15 phessler Exp $ */ +/* $OpenBSD: bfd.c,v 1.55 2017/01/22 00:39:45 phessler Exp $ */ /* * Copyright (c) 2016 Peter Hessler @@ -443,6 +443,17 @@ bfd_listener(struct bfd_config *bfd, unsigned int port) goto close; } + MGET(mopt, M_WAIT, MT_SOOPTS); + mopt->m_len = sizeof(int); + ip = mtod(mopt, int *); + *ip = IPTOS_PREC_INTERNETCONTROL; + error = sosetopt(so, IPPROTO_IP, IP_TOS, mopt); + if (error) { + printf("%s: sosetopt error %d\n", + __func__, error); + goto close; + } + MGET(m, M_WAIT, MT_SONAME); m->m_len = src->sa_len; sa = mtod(m, struct sockaddr *); -- cgit v1.2.3