diff options
| -rw-r--r-- | vrrpd/vrrp.c | 9 | ||||
| -rw-r--r-- | vrrpd/vrrp_main.c | 2 | ||||
| -rw-r--r-- | vrrpd/vrrp_vty.c | 4 | ||||
| -rw-r--r-- | zebra/zapi_msg.c | 1 | 
4 files changed, 9 insertions, 7 deletions
diff --git a/vrrpd/vrrp.c b/vrrpd/vrrp.c index d50fb4f2ec..02652d6abf 100644 --- a/vrrpd/vrrp.c +++ b/vrrpd/vrrp.c @@ -709,6 +709,8 @@ static int vrrp_bind_to_primary_connected(struct vrrp_router *r)  		break;  	} +	int ret = 0; +  	sockopt_reuseaddr(r->sock_tx);  	if (bind(r->sock_tx, (const struct sockaddr *)&su, sizeof(su)) < 0) {  		zlog_err( @@ -719,7 +721,7 @@ static int vrrp_bind_to_primary_connected(struct vrrp_router *r)  				  (const void *)&c->address->u.prefix, ipstr,  				  sizeof(ipstr)),  			safe_strerror(errno)); -		return -1; +		ret = -1;  	} else {  		DEBUGD(&vrrp_dbg_sock,  		       VRRP_LOGPFX VRRP_LOGPFX_VRID VRRP_LOGPFX_FAM @@ -729,7 +731,7 @@ static int vrrp_bind_to_primary_connected(struct vrrp_router *r)  				 ipstr, sizeof(ipstr)));  	} -	return 0; +	return ret;  } @@ -2365,9 +2367,8 @@ void vrrp_fini(void)  	struct listnode *ln;  	struct vrrp_vrouter *vr; -	for (ALL_LIST_ELEMENTS_RO(vrs, ln, vr)) { +	for (ALL_LIST_ELEMENTS_RO(vrs, ln, vr))  		vrrp_vrouter_destroy(vr); -	}  	list_delete(&vrs); diff --git a/vrrpd/vrrp_main.c b/vrrpd/vrrp_main.c index bb3cc595d8..46a92d936a 100644 --- a/vrrpd/vrrp_main.c +++ b/vrrpd/vrrp_main.c @@ -57,7 +57,7 @@ struct zebra_privs_t vrrp_privs = {  	.cap_num_p = array_size(_caps_p),  	.cap_num_i = 0}; -struct option longopts[] = {{0}}; +struct option longopts[] = { {0} };  /* Master of threads. */  struct thread_master *master; diff --git a/vrrpd/vrrp_vty.c b/vrrpd/vrrp_vty.c index b14efc33e7..48d81b0258 100644 --- a/vrrpd/vrrp_vty.c +++ b/vrrpd/vrrp_vty.c @@ -144,8 +144,8 @@ DEFPY(vrrp_advertisement_interval,  	VTY_DECLVAR_CONTEXT(interface, ifp);  	struct vrrp_vrouter *vr; -	uint16_t newadvint = no ? vd.advertisement_interval * 10: -				  advertisement_interval; +	uint16_t newadvint = +		no ? vd.advertisement_interval * 10 : advertisement_interval;  	if (newadvint % 10 != 0) {  		vty_out(vty, "%% Value must be a multiple of 10\n"); diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c index 6a478560ab..94bfa34b38 100644 --- a/zebra/zapi_msg.c +++ b/zebra/zapi_msg.c @@ -72,6 +72,7 @@ static void zserv_encode_interface(struct stream *s, struct interface *ifp)  {  	/* Interface information. */  	struct zebra_if *zif = ifp->info; +  	stream_put(s, ifp->name, INTERFACE_NAMSIZ);  	stream_putl(s, ifp->ifindex);  	stream_putc(s, ifp->status);  | 
