<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/net/ping.c, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>net: add missing SPDX-License-Identifier for files originating from LiMon</title>
<updated>2025-08-18T13:47:57+00:00</updated>
<author>
<name>Max Merchel</name>
<email>Max.Merchel@ew.tq-group.com</email>
</author>
<published>2025-08-14T12:03:52+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4800a6a0b3fa9d00f1ec40233a0e16464987c24f'/>
<id>4800a6a0b3fa9d00f1ec40233a0e16464987c24f</id>
<content type='text'>
The header of LiMon imported files reference a License file which
does not exist in U-Boot. Some files were forgotten when adding the
SPDX-License-Identifier.
The LiMon files were originally licensed under GPLv2 as can be seen in
commit [2ea91039].

Based on this commit, add the correct SPDX license identifier.
While at it drop the reference to the non-existing License file from all
LiMon files and update the SPDX-License-Identifier to SPDX version 3.

Signed-off-by: Max Merchel &lt;Max.Merchel@ew.tq-group.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The header of LiMon imported files reference a License file which
does not exist in U-Boot. Some files were forgotten when adding the
SPDX-License-Identifier.
The LiMon files were originally licensed under GPLv2 as can be seen in
commit [2ea91039].

Based on this commit, add the correct SPDX license identifier.
While at it drop the reference to the non-existing License file from all
LiMon files and update the SPDX-License-Identifier to SPDX version 3.

Signed-off-by: Max Merchel &lt;Max.Merchel@ew.tq-group.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: Do not respond to ICMP_ECHO_REQUEST if we do not have an IP address</title>
<updated>2021-01-19T14:15:02+00:00</updated>
<author>
<name>David Rivshin</name>
<email>DRivshin@allworx.com</email>
</author>
<published>2020-11-15T03:12:47+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=51723c5581241a3886a5adaa780c09138163d0b2'/>
<id>51723c5581241a3886a5adaa780c09138163d0b2</id>
<content type='text'>
While doing DHCP the interface IP is set to 0.0.0.0. This causes the
check in net.c on dst_ip to be effectively skipped, and all IP datagrams
are accepted up the IP stack. In the case of an ICMP_ECHO_REQUEST for the
matching MAC address (regardless of destination IP), the result is that
an ICMP_ECHO_REPLY is sent. The source address of the ICMP_ECHO_REPLY is
0.0.0.0, which is an illegal source address.

This can happen in common practice with the following sequence:
DHCP (U-Boot or OS) acquires IP address 10.0.0.1
System reboots
U-Boot starts DHCP and send DHCP DISCOVER
DHCP server decides to OFFER 10.0.0.1 again
  (perhaps because of existing lease or manual configuration)
DHCP server tries to PING 10.0.0.1 to see if anyone is squatting on it
DHCP server still has our MAC address in its ARP table for 10.0.0.1
U-Boot receives PING, and responds with an illegal source address
This may further result in a the DHCP server seeing the response as
  confirmation that someone is squatting on 10.0.0.1, and picking a
  new IP address from the pool to try again

Signed-off-by: David Rivshin &lt;drivshin@allworx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While doing DHCP the interface IP is set to 0.0.0.0. This causes the
check in net.c on dst_ip to be effectively skipped, and all IP datagrams
are accepted up the IP stack. In the case of an ICMP_ECHO_REQUEST for the
matching MAC address (regardless of destination IP), the result is that
an ICMP_ECHO_REPLY is sent. The source address of the ICMP_ECHO_REPLY is
0.0.0.0, which is an illegal source address.

This can happen in common practice with the following sequence:
DHCP (U-Boot or OS) acquires IP address 10.0.0.1
System reboots
U-Boot starts DHCP and send DHCP DISCOVER
DHCP server decides to OFFER 10.0.0.1 again
  (perhaps because of existing lease or manual configuration)
DHCP server tries to PING 10.0.0.1 to see if anyone is squatting on it
DHCP server still has our MAC address in its ARP table for 10.0.0.1
U-Boot receives PING, and responds with an illegal source address
This may further result in a the DHCP server seeing the response as
  confirmation that someone is squatting on 10.0.0.1, and picking a
  new IP address from the pool to try again

Signed-off-by: David Rivshin &lt;drivshin@allworx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>common: Drop log.h from common header</title>
<updated>2020-05-19T01:19:18+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2020-05-10T17:40:05+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f7ae49fc4f363a803dab3be078e93ead8e75a8e9'/>
<id>f7ae49fc4f363a803dab3be078e93ead8e75a8e9</id>
<content type='text'>
Move this header out of the common header.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move this header out of the common header.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>common: Drop net.h from common header</title>
<updated>2020-05-18T21:33:31+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2020-05-10T17:39:56+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=90526e9fbac47af16d70f323feae45d8d1b0f9b7'/>
<id>90526e9fbac47af16d70f323feae45d8d1b0f9b7</id>
<content type='text'>
Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: Consolidate UDP header functions</title>
<updated>2018-10-10T17:29:02+00:00</updated>
<author>
<name>Duncan Hare</name>
<email>DH@Synoia.com</email>
</author>
<published>2018-06-24T22:40:41+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5d457ecbef5eba8eaeed513c65c55453de4f3975'/>
<id>5d457ecbef5eba8eaeed513c65c55453de4f3975</id>
<content type='text'>
Make it possible to add TCP versions of the same, while reusing
IP portions. This patch should not change any behavior.

Signed-off-by: Duncan Hare &lt;DH@Synoia.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make it possible to add TCP versions of the same, while reusing
IP portions. This patch should not change any behavior.

Signed-off-by: Duncan Hare &lt;DH@Synoia.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: Don't overwrite waiting packets with asynchronous replies</title>
<updated>2018-10-10T17:29:01+00:00</updated>
<author>
<name>Joe Hershberger</name>
<email>joe.hershberger@ni.com</email>
</author>
<published>2018-09-26T21:49:02+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ac3f26cc15ad7e3e9efc2b0b0e18c6e84d93af77'/>
<id>ac3f26cc15ad7e3e9efc2b0b0e18c6e84d93af77</id>
<content type='text'>
Peter originally sent a fix, but it breaks a number of other things.
This addresses the original reported issue in a different way.

That report was:

&gt; U-Boot has 1 common buffer to send Ethernet frames, pointed to by
&gt; net_tx_packet.  When sending to an IP address without knowing the MAC
&gt; address, U-Boot makes an ARP request (using the arp_tx_packet buffer)
&gt; to find out the MAC address of the IP addressr. When a matching ARP
&gt; reply is received, U-Boot continues sending the frame stored in the
&gt; net_tx_packet buffer.
&gt;
&gt; However, in the mean time, if U-Boot needs to send out any network
&gt; packets (e.g. replying ping packets or ARP requests for its own IP
&gt; address etc.), it will use the net_tx_packet buffer to prepare the
&gt; new packet. Thus this buffer is no longer the original packet meant
&gt; to be transmitted after the ARP reply. The original packet will be
&gt; lost.

This instead uses the ARP tx buffer to send async replies in the case
where we are actively waiting for an ARP reply.

Signed-off-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;

Reported-by: Tran Tien Dat &lt;peter.trantiendat@gmail.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Tested-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Peter originally sent a fix, but it breaks a number of other things.
This addresses the original reported issue in a different way.

That report was:

&gt; U-Boot has 1 common buffer to send Ethernet frames, pointed to by
&gt; net_tx_packet.  When sending to an IP address without knowing the MAC
&gt; address, U-Boot makes an ARP request (using the arp_tx_packet buffer)
&gt; to find out the MAC address of the IP addressr. When a matching ARP
&gt; reply is received, U-Boot continues sending the frame stored in the
&gt; net_tx_packet buffer.
&gt;
&gt; However, in the mean time, if U-Boot needs to send out any network
&gt; packets (e.g. replying ping packets or ARP requests for its own IP
&gt; address etc.), it will use the net_tx_packet buffer to prepare the
&gt; new packet. Thus this buffer is no longer the original packet meant
&gt; to be transmitted after the ARP reply. The original packet will be
&gt; lost.

This instead uses the ARP tx buffer to send async replies in the case
where we are actively waiting for an ARP reply.

Signed-off-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;

Reported-by: Tran Tien Dat &lt;peter.trantiendat@gmail.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Tested-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: Always align tx packets</title>
<updated>2018-06-13T18:54:15+00:00</updated>
<author>
<name>Mario Six</name>
<email>mario.six@gdsys.cc</email>
</author>
<published>2018-03-28T12:38:49+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2d8f25ed7b3626930b9fc950b20a1ec0be7abbe9'/>
<id>2d8f25ed7b3626930b9fc950b20a1ec0be7abbe9</id>
<content type='text'>
Make sure that TX packets are always cache-aligned.

Signed-off-by: Mario Six &lt;mario.six@gdsys.cc&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make sure that TX packets are always cache-aligned.

Signed-off-by: Mario Six &lt;mario.six@gdsys.cc&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>SPDX: Convert a few files that were missed before</title>
<updated>2018-05-11T00:38:35+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2018-05-07T21:02:21+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f739fcd831240dda10a92f4212f1854f8481aeee'/>
<id>f739fcd831240dda10a92f4212f1854f8481aeee</id>
<content type='text'>
As part of the main conversion a few files were missed.  These files had
additional whitespace after the '*' and before the SPDX tag and my
previous regex was too strict.  This time I did a grep for all SPDX tags
and then filtered out anything that matched the correct styles.

Fixes: 83d290c56fab ("SPDX: Convert all of our single license tags to Linux Kernel style")
Reported-by: Heinrich Schuchardt &lt;xypron.debian@gmx.de&gt;
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As part of the main conversion a few files were missed.  These files had
additional whitespace after the '*' and before the SPDX tag and my
previous regex was too strict.  This time I did a grep for all SPDX tags
and then filtered out anything that matched the correct styles.

Fixes: 83d290c56fab ("SPDX: Convert all of our single license tags to Linux Kernel style")
Reported-by: Heinrich Schuchardt &lt;xypron.debian@gmx.de&gt;
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: cosmetic: Fix checkpatch.pl failures in net.c</title>
<updated>2015-04-18T17:11:35+00:00</updated>
<author>
<name>Joe Hershberger</name>
<email>joe.hershberger@ni.com</email>
</author>
<published>2015-04-08T06:41:21+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=bc0571fc1067ff8a8fd16990ae65c1a2826ea90c'/>
<id>bc0571fc1067ff8a8fd16990ae65c1a2826ea90c</id>
<content type='text'>
Finish eliminating CamelCase from net.c and other failures

Signed-off-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Finish eliminating CamelCase from net.c and other failures

Signed-off-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: cosmetic: Clean up ping variables and functions</title>
<updated>2015-04-18T17:11:34+00:00</updated>
<author>
<name>Joe Hershberger</name>
<email>joe.hershberger@ni.com</email>
</author>
<published>2015-04-08T06:41:13+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=331db5a90f0431465c36189672b2096b9b1e37d0'/>
<id>331db5a90f0431465c36189672b2096b9b1e37d0</id>
<content type='text'>
Make a thorough pass through all variables and function names contained
within ping.c and remove CamelCase and improve naming.

Signed-off-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make a thorough pass through all variables and function names contained
within ping.c and remove CamelCase and improve naming.

Signed-off-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
