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
+3
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).
+1 -1
Submodule arch updated: 93c52e9803...350314f22d
+1 -1
Submodule configs updated: eadf9704c9...a2aa9788c8
+1 -20
View File
@@ -398,35 +398,16 @@ 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
/* If we are configured to use ping IP address configuration and
* 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"); nlldbg("No IP address assigned\n");
goto drop; goto drop;
} }
}
/* Check if the packet is destined for out IP address */ /* Check if the packet is destined for out IP address */
else else
+1 -4
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
+4 -5
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
-12
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;
+5
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