Remove CONFIG_NET_PINGADDRCONF. This was a uIP way of assigning IP addresses, but is not standard and not a appropriate feature in general.

This commit is contained in:
Gregory Nutt 2015-12-01 07:48:56 -06:00
parent 053aeb555c
commit 6af3ba78b9
8 changed files with 18 additions and 45 deletions

View File

@ -11186,3 +11186,6 @@
(2015-11-30). (2015-11-30).
* configs/same70-xplained/netnsh: Added and verified a network-enabled * configs/same70-xplained/netnsh: Added and verified a network-enabled
NSH configuration for the SAME70-Xplained board (2015-11-20). NSH configuration for the SAME70-Xplained board (2015-11-20).
* net/: Remove CONFIG_NET_PINGADDRCONF. This was a uIP way of assigning
IP addresses, but is not standard and not a appropriate feature in
general (2015-12-01).

2
arch

@ -1 +1 @@
Subproject commit 93c52e98030b3f596c0c93008cdeb0f9d2c4d0fc Subproject commit 350314f22d2357cf4f67b384c89eaa92715758c3

@ -1 +1 @@
Subproject commit eadf9704c93f1a5cc0d90b78cf3cc9e5de26dbfc Subproject commit a2aa9788c844ebebb9da4276310b4bd6d0f7a54c

View File

@ -398,34 +398,15 @@ int ipv4_input(FAR struct net_driver_s *dev)
return udp_ipv4_input(dev); return udp_ipv4_input(dev);
} }
/* In most other cases, the device must be assigned a non-zero IP /* In other cases, the device must be assigned a non-zero IP address. */
* address. Another exception is when CONFIG_NET_PINGADDRCONF is
* enabled...
*/
else else
#endif #endif
#ifdef CONFIG_NET_ICMP #ifdef CONFIG_NET_ICMP
if (net_ipv4addr_cmp(dev->d_ipaddr, INADDR_ANY)) if (net_ipv4addr_cmp(dev->d_ipaddr, INADDR_ANY))
{ {
#ifdef CONFIG_NET_PINGADDRCONF nlldbg("No IP address assigned\n");
/* If we are configured to use ping IP address configuration and goto drop;
* hasn't been assigned an IP address yet, we accept all ICMP
* packets.
*/
if (pbuf->proto == IP_PROTO_ICMP)
{
nlldbg("Possible ping config packet received\n");
icmp_input(dev);
goto drop;
}
else
#endif
{
nlldbg("No IP address assigned\n");
goto drop;
}
} }
/* Check if the packet is destined for out IP address */ /* Check if the packet is destined for out IP address */

View File

@ -204,10 +204,7 @@ int ipv6_input(FAR struct net_driver_s *dev)
return udp_ipv6_input(dev); return udp_ipv6_input(dev);
} }
/* In most other cases, the device must be assigned a non-zero IP /* In other cases, the device must be assigned a non-zero IP address. */
* address. Another exception is when CONFIG_NET_PINGADDRCONF is
* enabled...
*/
else else
#endif #endif

View File

@ -18,15 +18,14 @@ if NET_ICMP
config NET_ICMP_PING config NET_ICMP_PING
bool "ICMP ping interfaces" bool "ICMP ping interfaces"
default n default n
depends on BUILD_FLAT
---help--- ---help---
Provide interfaces to support application level support for Provide interfaces to support application level support for
for sending ECHO (ping) requests and associating ECHO replies. for sending ECHO (ping) requests and associating ECHO replies.
config NET_PINGADDRCONF NOTE: Calling these interfaces from application space is a
bool "Ping address configuration" violation of the OS/application interface but for historical
default n reasons, is permitted in the flat build.
---help---
Use "ping" packet for setting IP address
endif # NET_ICMP endif # NET_ICMP
endmenu # ICMP Networking Support endmenu # ICMP Networking Support

View File

@ -117,18 +117,6 @@ void icmp_input(FAR struct net_driver_s *dev)
if (picmp->type == ICMP_ECHO_REQUEST) if (picmp->type == ICMP_ECHO_REQUEST)
{ {
/* If we are configured to use ping IP address assignment, we use
* the destination IP address of this ping packet and assign it to
* ourself.
*/
#ifdef CONFIG_NET_PINGADDRCONF
if (dev->d_ipaddr == 0)
{
dev->d_ipaddr = picmp->destipaddr;
}
#endif
/* Change the ICMP type */ /* Change the ICMP type */
picmp->type = ICMP_ECHO_REPLY; picmp->type = ICMP_ECHO_REPLY;

View File

@ -19,10 +19,15 @@ if NET_ICMPv6
config NET_ICMPv6_PING config NET_ICMPv6_PING
bool "ICMPv6 ping interfaces" bool "ICMPv6 ping interfaces"
default n default n
depends on BUILD_FLAT
---help--- ---help---
Provide interfaces to support application level support for Provide interfaces to support application level support for
for sending ECHO (ping) requests and associating ECHO replies. for sending ECHO (ping) requests and associating ECHO replies.
NOTE: Calling these interfaces from application space is a
violation of the OS/application interface but for historical
reasons, is permitted in the flat build.
config NET_ICMPv6_NEIGHBOR config NET_ICMPv6_NEIGHBOR
bool "Solicit destination addresses" bool "Solicit destination addresses"
default n default n