diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-06-15 19:10:05 +0200 |
---|---|---|
committer | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2019-08-07 02:45:14 +0200 |
commit | 128ed7604d0d90de1e49a847cc4aa4f585b2b7c5 (patch) | |
tree | 62c33ac55c771b4a4a26e93a04f0652c59714db3 /eigrpd/eigrp_network.c | |
parent | eigrpd: Add various vrf handling functions (diff) | |
download | frr-128ed7604d0d90de1e49a847cc4aa4f585b2b7c5.tar.xz frr-128ed7604d0d90de1e49a847cc4aa4f585b2b7c5.zip |
eigrpd: Create a socket per vrf for communication
Setup EIGRP to use a socket per vrf for communication
amongst it's peers.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'eigrpd/eigrp_network.c')
-rw-r--r-- | eigrpd/eigrp_network.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/eigrpd/eigrp_network.c b/eigrpd/eigrp_network.c index bbb9487b4..95cf948d0 100644 --- a/eigrpd/eigrp_network.c +++ b/eigrpd/eigrp_network.c @@ -53,7 +53,7 @@ static int eigrp_network_match_iface(const struct prefix *connected_prefix, static void eigrp_network_run_interface(struct eigrp *, struct prefix *, struct interface *); -int eigrp_sock_init(void) +int eigrp_sock_init(struct vrf *vrf) { int eigrp_sock; int ret; @@ -62,7 +62,9 @@ int eigrp_sock_init(void) #endif frr_elevate_privs(&eigrpd_privs) { - eigrp_sock = socket(AF_INET, SOCK_RAW, IPPROTO_EIGRPIGP); + eigrp_sock = vrf_socket( + AF_INET, SOCK_RAW, IPPROTO_EIGRPIGP, vrf->vrf_id, + vrf->vrf_id != VRF_DEFAULT ? vrf->name : NULL); if (eigrp_sock < 0) { zlog_err("eigrp_read_sock_init: socket: %s", safe_strerror(errno)); |