mirror of
https://gitlab.labs.nic.cz/labs/bird.git
synced 2024-05-11 16:54:54 +00:00
Better packet priority and traffic class handling.
Implements support for IPv6 traffic class, sets higher priority for OSPF and RIP outgoing packets by default and allows to configure ToS/DS/TClass IP header field and the local priority of outgoing packets.
This commit is contained in:
@@ -310,3 +310,22 @@ sk_set_min_ttl6(sock *s, int ttl)
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef IPV6_TCLASS
|
||||
#define IPV6_TCLASS 67
|
||||
#endif
|
||||
|
||||
int sk_priority_control = 7;
|
||||
|
||||
static int
|
||||
sk_set_priority(sock *s, int prio)
|
||||
{
|
||||
if (setsockopt(s->fd, SOL_SOCKET, SO_PRIORITY, &prio, sizeof(prio)) < 0)
|
||||
{
|
||||
log(L_WARN "sk_set_priority: setsockopt: %m");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user