net/icmp and icmpv6: Bind icmp callback from device to connection. Resolves the issue that bind() could not be called before send()

This commit is contained in:
anchao
2019-03-19 09:43:32 -06:00
committed by Gregory Nutt
parent b161682adc
commit c9b73f5139
16 changed files with 154 additions and 133 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* net/netdev/netdev_ioctl.c
*
* Copyright (C) 2007-2012, 2015-2018 Gregory Nutt. All rights reserved.
* Copyright (C) 2007-2012, 2015-2019 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -897,7 +897,7 @@ static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd,
dev = netdev_ifr_dev(req);
if (dev)
{
ret = icmpv6_autoconfig(dev);
ret = icmpv6_autoconfig(dev, psock);
}
}
break;