summaryrefslogtreecommitdiff
path: root/usr.sbin/ospf6d
diff options
context:
space:
mode:
authorJob Snijders <job@cvs.openbsd.org>2024-05-15 08:45:04 +0000
committerJob Snijders <job@cvs.openbsd.org>2024-05-15 08:45:04 +0000
commit5010ce3b4978ccd60d938fe896618963fcd94353 (patch)
treea83bf13eda8aca62ccc494886be1280785c9f9d0 /usr.sbin/ospf6d
parent339e9e029df38fb819af375b42cddc8f70920520 (diff)
Mark network control packets with DSCP CS6 (parity with ospfd)
OK claudio@
Diffstat (limited to 'usr.sbin/ospf6d')
-rw-r--r--usr.sbin/ospf6d/ospfe.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/ospf6d/ospfe.c b/usr.sbin/ospf6d/ospfe.c
index a2a161a9889..0627ca71116 100644
--- a/usr.sbin/ospf6d/ospfe.c
+++ b/usr.sbin/ospf6d/ospfe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ospfe.c,v 1.71 2023/12/13 15:34:43 claudio Exp $ */
+/* $OpenBSD: ospfe.c,v 1.72 2024/05/15 08:45:03 job Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -75,6 +75,7 @@ ospfe(struct ospfd_conf *xconf, int pipe_parent2ospfe[2], int pipe_ospfe2rde[2],
struct passwd *pw;
struct event ev_sigint, ev_sigterm;
pid_t pid;
+ int pre = IPTOS_PREC_INTERNETCONTROL;
switch (pid = fork()) {
case -1:
@@ -90,6 +91,10 @@ ospfe(struct ospfd_conf *xconf, int pipe_parent2ospfe[2], int pipe_ospfe2rde[2],
SOCK_RAW | SOCK_CLOEXEC | SOCK_NONBLOCK, IPPROTO_OSPF)) == -1)
fatal("error creating raw socket");
+ if (setsockopt(xconf->ospf_socket, IPPROTO_IPV6, IPV6_TCLASS, &pre,
+ sizeof(pre)) == -1)
+ fatal("setsockopt IPV6_TCLASS");
+
/* set some defaults */
if (if_set_mcast_loop(xconf->ospf_socket) == -1)
fatal("if_set_mcast_loop");