summaryrefslogtreecommitdiff
path: root/libndp/libndp.c
diff options
context:
space:
mode:
authorJiri Pirko <jiri@resnulli.us>2013-03-16 20:31:40 +0100
committerJiri Pirko <jiri@resnulli.us>2013-03-17 11:11:48 +0100
commit993764c3b2defdf053facbc29eadc0a4abeddb0d (patch)
tree720b26c2ef71612bc13b7dca23b73e73371a1494 /libndp/libndp.c
parentb125126fbfcf250d7abc62d85dfe6c95a78d785b (diff)
downloadlibndp-993764c3b2defdf053facbc29eadc0a4abeddb0d.tar.gz
lib: remove local ifindex variable in ndp_sock_recv
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Diffstat (limited to 'libndp/libndp.c')
-rw-r--r--libndp/libndp.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libndp/libndp.c b/libndp/libndp.c
index 818d40e..9272477 100644
--- a/libndp/libndp.c
+++ b/libndp/libndp.c
@@ -1062,7 +1062,6 @@ static int ndp_call_handlers(struct ndp *ndp, struct ndp_msg *msg);
static int ndp_sock_recv(struct ndp *ndp)
{
- uint32_t ifindex = ifindex;
struct ndp_msg *msg;
enum ndp_msg_type msg_type;
size_t len = sizeof(msg->buf);
@@ -1072,15 +1071,15 @@ static int ndp_sock_recv(struct ndp *ndp)
if (!msg)
return -ENOMEM;
- err = myrecvfrom6(ndp->sock, msg->buf, &len, 0, &msg->addrto, &ifindex);
+ err = myrecvfrom6(ndp->sock, msg->buf, &len, 0,
+ &msg->addrto, &msg->ifindex);
if (err) {
err(ndp, "Failed to receive message");
goto free_msg;
}
dbg(ndp, "rcvd from: %s, ifindex: %u",
- str_in6_addr(&msg->addrto), ifindex);
+ str_in6_addr(&msg->addrto), msg->ifindex);
- msg->ifindex = ifindex;
ndp_msg_payload_len_set(msg, len);
if (len < sizeof(*msg->icmp6_hdr)) {