Skip to content

Commit eb97742

Browse files
committed
UCS/NETLINK: minor fixes
1 parent 5105633 commit eb97742

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/ucs/sys/netlink.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,7 @@ ucs_netlink_get_route_info(const struct rtattr *rta, int len, int *if_index_p,
189189
}
190190
}
191191

192-
/* In some kernel versions, RTA_DST attribute is not set for default
193-
* gateway routes */
192+
/* dst_in_addr is required only for non-default gateway routes */
194193
if ((*if_index_p == -1) || ((*dst_in_addr == NULL) && (rtm_dst_len != 0))) {
195194
return UCS_ERR_INVALID_PARAM;
196195
}

src/uct/tcp/tcp_iface.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ static ucs_status_t uct_tcp_iface_get_device_address(uct_iface_h tl_iface,
139139
dev_addr->flags = 0;
140140
dev_addr->sa_family = saddr->sa_family;
141141

142+
/* Default gateway is not relevant for IPoIB interfaces */
142143
if (!ucs_netif_is_ipoib(iface->if_name)) {
143144
dev_addr->flags |= UCT_TCP_DEVICE_ADDR_FLAG_ALLOW_DEFAULT_GW;
144145
}
@@ -269,7 +270,6 @@ uct_tcp_iface_is_reachable_v2(const uct_iface_h tl_iface,
269270
return 0;
270271
}
271272

272-
/* Default gateway is not relevant for IPoIB interfaces */
273273
allow_default_gw = !!(tcp_dev_addr->flags &
274274
UCT_TCP_DEVICE_ADDR_FLAG_ALLOW_DEFAULT_GW);
275275

0 commit comments

Comments
 (0)