diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2022-08-09 20:09:03 -0400 | 
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2022-08-17 16:04:50 -0400 | 
| commit | 725d9f5945569904938db311871931e2718330f1 (patch) | |
| tree | d4ccbf09e3c0b93849d7a693b9bbd1a1c04658e9 /zebra/kernel_socket.c | |
| parent | 07fd1f7e9420efd480e85a9ab72b88fff274f791 (diff) | |
zebra: No need for a rib_delete before a rib_add
In kernel_socket.c, the code is deleting and then adding
the route back in on a change operation.  This just translates
too two re's, one for deletion and one for addition.  The deletion
will just be ignored.  Let's not do the extra deletion.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'zebra/kernel_socket.c')
| -rw-r--r-- | zebra/kernel_socket.c | 8 | 
1 files changed, 0 insertions, 8 deletions
diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c index cb549339af..4c089ee194 100644 --- a/zebra/kernel_socket.c +++ b/zebra/kernel_socket.c @@ -1112,14 +1112,6 @@ void rtm_read(struct rt_msghdr *rtm)  	} else  		return; -	/* -	 * CHANGE: delete the old prefix, we have no further information -	 * to specify the route really -	 */ -	if (rtm->rtm_type == RTM_CHANGE) -		rib_delete(afi, SAFI_UNICAST, VRF_DEFAULT, ZEBRA_ROUTE_KERNEL, -			   0, zebra_flags, &p, NULL, NULL, 0, RT_TABLE_MAIN, 0, -			   0, true);  	if (rtm->rtm_type == RTM_GET || rtm->rtm_type == RTM_ADD  	    || rtm->rtm_type == RTM_CHANGE)  		rib_add(afi, SAFI_UNICAST, VRF_DEFAULT, proto, 0, zebra_flags,  | 
