diff options
Diffstat (limited to 'drivers/infiniband/hw/nes/nes_cm.c')
-rw-r--r-- | drivers/infiniband/hw/nes/nes_cm.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c index 425065b36b8c..a4972abedef1 100644 --- a/drivers/infiniband/hw/nes/nes_cm.c +++ b/drivers/infiniband/hw/nes/nes_cm.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2006 - 2009 Intel Corporation. All rights reserved. | 2 | * Copyright (c) 2006 - 2011 Intel Corporation. All rights reserved. |
3 | * | 3 | * |
4 | * This software is available to you under a choice of one of two | 4 | * This software is available to you under a choice of one of two |
5 | * licenses. You may choose to be licensed under the terms of the GNU | 5 | * licenses. You may choose to be licensed under the terms of the GNU |
@@ -233,6 +233,7 @@ static int send_mpa_reject(struct nes_cm_node *cm_node) | |||
233 | u8 *start_ptr = &start_addr; | 233 | u8 *start_ptr = &start_addr; |
234 | u8 **start_buff = &start_ptr; | 234 | u8 **start_buff = &start_ptr; |
235 | u16 buff_len = 0; | 235 | u16 buff_len = 0; |
236 | struct ietf_mpa_v1 *mpa_frame; | ||
236 | 237 | ||
237 | skb = dev_alloc_skb(MAX_CM_BUFFER); | 238 | skb = dev_alloc_skb(MAX_CM_BUFFER); |
238 | if (!skb) { | 239 | if (!skb) { |
@@ -242,6 +243,8 @@ static int send_mpa_reject(struct nes_cm_node *cm_node) | |||
242 | 243 | ||
243 | /* send an MPA reject frame */ | 244 | /* send an MPA reject frame */ |
244 | cm_build_mpa_frame(cm_node, start_buff, &buff_len, NULL, MPA_KEY_REPLY); | 245 | cm_build_mpa_frame(cm_node, start_buff, &buff_len, NULL, MPA_KEY_REPLY); |
246 | mpa_frame = (struct ietf_mpa_v1 *)*start_buff; | ||
247 | mpa_frame->flags |= IETF_MPA_FLAGS_REJECT; | ||
245 | form_cm_frame(skb, cm_node, NULL, 0, *start_buff, buff_len, SET_ACK | SET_FIN); | 248 | form_cm_frame(skb, cm_node, NULL, 0, *start_buff, buff_len, SET_ACK | SET_FIN); |
246 | 249 | ||
247 | cm_node->state = NES_CM_STATE_FIN_WAIT1; | 250 | cm_node->state = NES_CM_STATE_FIN_WAIT1; |
@@ -1360,8 +1363,7 @@ static int nes_addr_resolve_neigh(struct nes_vnic *nesvnic, u32 dst_ip, int arpi | |||
1360 | if (!memcmp(nesadapter->arp_table[arpindex].mac_addr, | 1363 | if (!memcmp(nesadapter->arp_table[arpindex].mac_addr, |
1361 | neigh->ha, ETH_ALEN)) { | 1364 | neigh->ha, ETH_ALEN)) { |
1362 | /* Mac address same as in nes_arp_table */ | 1365 | /* Mac address same as in nes_arp_table */ |
1363 | ip_rt_put(rt); | 1366 | goto out; |
1364 | return rc; | ||
1365 | } | 1367 | } |
1366 | 1368 | ||
1367 | nes_manage_arp_cache(nesvnic->netdev, | 1369 | nes_manage_arp_cache(nesvnic->netdev, |
@@ -1377,6 +1379,8 @@ static int nes_addr_resolve_neigh(struct nes_vnic *nesvnic, u32 dst_ip, int arpi | |||
1377 | neigh_event_send(neigh, NULL); | 1379 | neigh_event_send(neigh, NULL); |
1378 | } | 1380 | } |
1379 | } | 1381 | } |
1382 | |||
1383 | out: | ||
1380 | rcu_read_unlock(); | 1384 | rcu_read_unlock(); |
1381 | ip_rt_put(rt); | 1385 | ip_rt_put(rt); |
1382 | return rc; | 1386 | return rc; |