]> git.puffer.fish Git - matthieu/frr.git/commit
lib: Allow bgp to always create a listen socket for the vrf
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 1 Feb 2019 16:54:59 +0000 (11:54 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 1 Feb 2019 16:54:59 +0000 (11:54 -0500)
commit0556fc33c7275c2a3b00047a536976f8dbf7cbb3
tree6fd2057cb3182deba2e50c336f7ee33dd39c530e
parent41e8603bfab2db06ac0f29bd57e95508bfae6798
lib: Allow bgp to always create a listen socket for the vrf

If tcp_l3mdev_accept = 0, then creating a socket for a vrf
for communication is allowed.  On the other hand if it is =1
then the vrf_socket() code assumes that we have created
a listen socket in the default vrf.  This is a bad assumption
in that it is perfectly valid to create a bgp instance like this:

router bgp 99 vrf BLUE
   <configuration>
!

But not to create a default bgp instance.  As such when BGP
would call the vrf_socket to create the listener for that vrf
the code was dissallowing it.

This code is incorrect behavior.  If we are passing in a interface
to bind the socket to, it is not the correct behavior to just not
bind, especially if the interface passed in is not a vrf name.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
lib/vrf.c