diff options
| author | Qiuwen Lu <[email protected]> | 2017-03-23 16:38:10 +0800 |
|---|---|---|
| committer | Qiuwen Lu <[email protected]> | 2017-03-23 16:38:10 +0800 |
| commit | 4a36ba10662ed704de163bffe1b4bf11229841e4 (patch) | |
| tree | 577f64514a238fd65ea5bf396e50b221dd8b1656 /app/src/sendpath.c | |
| parent | 42df3214fc22ce3a55c028bdb3d3a4dfa131bf4d (diff) | |
增加合法性检查标志
Diffstat (limited to 'app/src/sendpath.c')
| -rw-r--r-- | app/src/sendpath.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/src/sendpath.c b/app/src/sendpath.c index 06dfd5b..f79d469 100644 --- a/app/src/sendpath.c +++ b/app/src/sendpath.c @@ -53,9 +53,13 @@ static int droute_requery(struct mr_sendpath * sendpath) { neigh_create_or_update(instance->neigh, sendpath->target_addr, NULL, sendpath->target_vdi, 0); + return RT_ERR; + } + else + { + sendpath->can_use = 1; + return RT_SUCCESS; } - - return 0; } struct mr_sendpath * marsio_sendpath_create_by_droute(struct mr_vdev * dest_device, struct in_addr addr) @@ -84,6 +88,7 @@ struct mr_sendpath * marsio_sendpath_create_by_droute(struct mr_vdev * dest_devi sendpath->fn_l4_construct = NULL; sendpath->src_addr = vdev->in_addr; sendpath->dst_addr = addr; + sendpath->target_vdi = dest_device->vdi; /* 查ARP表 */ int ret = neigh_query(dest_device->instance->neigh, target_in_addr, |
