int eigrp_sock_init(struct vrf *vrf)
{
- int eigrp_sock;
+ int eigrp_sock = -1;
int ret;
#ifdef IP_HDRINCL
int hincl = 1;
#endif
+ if (!vrf)
+ return eigrp_sock;
+
frr_with_privs(&eigrpd_privs) {
eigrp_sock = vrf_socket(
AF_INET, SOCK_RAW, IPPROTO_EIGRPIGP, vrf->vrf_id,
rn->info = (void *)pref;
/* Schedule Router ID Update. */
- if (eigrp->router_id.s_addr == 0)
+ if (eigrp->router_id.s_addr == INADDR_ANY)
eigrp_router_id_update(eigrp);
/* Run network config now. */
/* Get target interface. */
{
struct listnode *node, *nnode;
struct route_node *rn;
- struct eigrp *eigrp = eigrp_lookup(ifp->vrf_id);
+ struct eigrp *eigrp;
/*
* In the event there are multiple eigrp autonymnous systems running,
if (!IPV4_ADDR_SAME(&pref->u.prefix4, &p->u.prefix4))
return 0;
- prefix_ipv4_free(rn->info);
- rn->info = NULL;
+ prefix_ipv4_free((struct prefix_ipv4 **)&rn->info);
route_unlock_node(rn); /* initial reference */
/* Find interfaces that not configured already. */