diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2011-09-28 14:23:35 +0400 |
---|---|---|
committer | Denis Ovsienko <infrastation@yandex.ru> | 2011-10-17 18:59:19 +0400 |
commit | 6d0732c8abad7ace509d033a41814ea03a3a1b16 (patch) | |
tree | d20c537d0e16cb5245047d8ecd9990201a4fb3b6 /bgpd | |
parent | a5b228b3792937c93b589938a2545b9311b7938e (diff) |
IPv6 transport class suppport
IPv6 supports the same concept of differentiated service for routing
protocols as IPv4, but like too many things, the standards committee
decided that having two names for the same thing wasn't good enough and
introduced a third more generic term transport class.
The socket option to set transport class works the same as IPv4, but the
arguments are different.
* lib/sockopt.[ch]
* setsockopt_ipv6_tclass(): new function
* bgpd/bgp_network.c
* bgp_connect(): set socket option
* bgp_listener(): set socket option
* ospf6d/ospf6_network.c
* ospf6_set_transport_class(): new function
* ospf6_serv_sock(): set socket option
* ripngd/ripngd.c
* ripng_make_socket(): set socket option
Diffstat (limited to 'bgpd')
-rw-r--r-- | bgpd/bgp_network.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c index 570cc3b7..c8ff87a6 100644 --- a/bgpd/bgp_network.c +++ b/bgpd/bgp_network.c @@ -330,6 +330,10 @@ bgp_connect (struct peer *peer) #ifdef IPTOS_PREC_INTERNETCONTROL if (sockunion_family (&peer->su) == AF_INET) setsockopt_ipv4_tos (peer->fd, IPTOS_PREC_INTERNETCONTROL); +# ifdef HAVE_IPV6 + else if (sockunion_family (&peer->su) == AF_INET6) + setsockopt_ipv6_tclass (peer->fd, IPTOS_PREC_INTERNETCONTROL); +# endif #endif if (peer->password) @@ -389,6 +393,10 @@ bgp_listener (int sock, struct sockaddr *sa, socklen_t salen) #ifdef IPTOS_PREC_INTERNETCONTROL if (sa->sa_family == AF_INET) setsockopt_ipv4_tos (sock, IPTOS_PREC_INTERNETCONTROL); +# ifdef HAVE_IPV6 + else if (sa->sa_family == AF_INET6) + setsockopt_ipv6_tclass (sock, IPTOS_PREC_INTERNETCONTROL); +# endif #endif #ifdef IPV6_V6ONLY |