diff options
author | Vipin Kumar <vipin@cumulusnetworks.com> | 2014-01-09 00:31:22 +0000 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2014-05-15 20:27:12 +0200 |
commit | 48fc05fb7e6ee44db9f73f3194bfd4738b7f9dc1 (patch) | |
tree | e0c11382f69fd3159600d18150f846dc104d8e43 /bgpd | |
parent | 6aa136f1eaeb0dfc1e39e6c2cd6380a399ef126f (diff) | |
download | quagga-48fc05fb7e6ee44db9f73f3194bfd4738b7f9dc1.tar.bz2 quagga-48fc05fb7e6ee44db9f73f3194bfd4738b7f9dc1.tar.xz |
bgpd: fix O_NONBLOCK on outgoing connects
BGP was setting sockets to be non-blocking only for the accepted passive
peers. As a fix, setting the BGP sockets to be non-blocking even for
the active peers.
Signed-off-by: Vipin Kumar <vipin@cumulusnetworks.com>
Reviewed-by: Pradosh Mohapatra <pmohapat@cumulusnetworks.com>
Reviewed-by: Dinesh Dutt <ddutt@cumulusnetworks.com>
[DL: patch split, this is item 1.]
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'bgpd')
-rw-r--r-- | bgpd/bgp_network.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c index 79d5d27d..bcaaba75 100644 --- a/bgpd/bgp_network.c +++ b/bgpd/bgp_network.c @@ -306,6 +306,8 @@ bgp_connect (struct peer *peer) if (peer->fd < 0) return -1; + set_nonblocking (peer->fd); + /* If we can get socket for the peer, adjest TTL and make connection. */ if (peer->sort == BGP_PEER_EBGP) { sockopt_ttl (peer->su.sa.sa_family, peer->fd, peer->ttl); |