diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-08-14 17:59:25 +0100 |
---|---|---|
committer | Paul Jakma <paul@quagga.net> | 2008-08-22 19:52:58 +0100 |
commit | 1423c809cc4ddc2e013ba6264c49a11e5719c6f2 (patch) | |
tree | db0389e7de020bbcb9fd78d45417b0842a6adb0b /bgpd | |
parent | 89d9fa301e146193093ff876f96b3612dc390bbb (diff) |
[lib] mes_lookup string lookup table argument should be marked const
2008-08-14 Stephen Hemminger <stephen.hemminger@vyatta.com>
* lib/log.{c,h}: struct message argument should point to const
* */*.c: adjust to suit,
Signed-off-by: Paul Jakma <paul@quagga.net>
Diffstat (limited to 'bgpd')
-rw-r--r-- | bgpd/bgp_network.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c index 71f3ec7d..5dbd4872 100644 --- a/bgpd/bgp_network.c +++ b/bgpd/bgp_network.c @@ -314,6 +314,11 @@ bgp_connect (struct peer *peer) sockopt_reuseaddr (peer->fd); sockopt_reuseport (peer->fd); +#ifdef IPTOS_PREC_INTERNETCONTROL + if (sockunion_family (&peer->su) == AF_INET) + setsockopt_ipv4_tos (peer->fd, IPTOS_PREC_INTERNETCONTROL); +#endif + if (peer->password) bgp_md5_set_connect (peer->fd, &peer->su, peer->password); @@ -402,6 +407,11 @@ bgp_socket (struct bgp *bgp, unsigned short port, char *address) sockopt_reuseaddr (sock); sockopt_reuseport (sock); +#ifdef IPTOS_PREC_INTERNETCONTROL + if (ainfo->ai_family == AF_INET) + setsockopt_ipv4_tos (sock, IPTOS_PREC_INTERNETCONTROL); +#endif + if (bgpd_privs.change (ZPRIVS_RAISE) ) zlog_err ("bgp_socket: could not raise privs"); @@ -454,6 +464,10 @@ bgp_socket (struct bgp *bgp, unsigned short port, char *address) sockopt_reuseaddr (sock); sockopt_reuseport (sock); +#ifdef IPTOS_PREC_INTERNETCONTROL + setsockopt_ipv4_tos (sock, IPTOS_PREC_INTERNETCONTROL); +#endif + memset (&sin, 0, sizeof (struct sockaddr_in)); sin.sin_family = AF_INET; |