diff options
| author | Philippe Guibert <philippe.guibert@6wind.com> | 2024-04-05 13:52:27 +0200 |
|---|---|---|
| committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2024-11-11 08:27:21 +0000 |
| commit | d9ba5bd55e01681b26a1a8358eaf7aaeb77cd30b (patch) | |
| tree | ee27619701d496824f56c2f78e22350615ad84c0 | |
| parent | a1270992b492bf467e1cf51870ae971ef86f0c07 (diff) | |
bgpd: remove useless control checks about TCP connection
When attempting to get the src and destination addresses of a given
connection, the API may return the NULL pointer, but further code
in bgp_zebra_nexthop_set() already does a check about the given
pointer.
Relaxing the error code for all the returned adressing.
Fixes: 1ff9a340588a ("bgpd: bgpd-fsm-fix.patch")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
(cherry picked from commit ba7130309954fbe8d58854339ca43259149e603a)
| -rw-r--r-- | bgpd/bgp_network.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c index b874e7211f..f08881512a 100644 --- a/bgpd/bgp_network.c +++ b/bgpd/bgp_network.c @@ -876,11 +876,7 @@ int bgp_getsockname(struct peer *peer) } peer->su_local = sockunion_getsockname(peer->connection->fd); - if (!peer->su_local) - return -1; peer->su_remote = sockunion_getpeername(peer->connection->fd); - if (!peer->su_remote) - return -1; if (!bgp_zebra_nexthop_set(peer->su_local, peer->su_remote, &peer->nexthop, peer)) { |
