summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Pirko <jiri@resnulli.us>2013-10-07 16:03:31 +0200
committerJiri Pirko <jiri@resnulli.us>2013-10-07 16:03:31 +0200
commitc6642387d1a2dd0c1ee230c126b629477da3add6 (patch)
treef505b632d36e8aefa8b2c0f812f07464088bddfd
parentfbee7a5beda5f20e3f2bbbc7cf823440c1a08b9f (diff)
downloadlibndp-c6642387d1a2dd0c1ee230c126b629477da3add6.tar.gz
libndp: do not fail on receiving non-ndp packets
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
-rw-r--r--libndp/libndp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libndp/libndp.c b/libndp/libndp.c
index 0600e59..09ec2aa 100644
--- a/libndp/libndp.c
+++ b/libndp/libndp.c
@@ -1579,8 +1579,10 @@ static int ndp_sock_recv(struct ndp *ndp)
goto free_msg;
}
err = ndp_msg_type_by_raw_type(&msg_type, msg->icmp6_hdr->icmp6_type);
- if (err)
+ if (err) {
+ err = 0;
goto free_msg;
+ }
ndp_msg_init(msg, msg_type);
ndp_msg_payload_len_set(msg, len);