1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 08:42:12 +02:00

net: Filter incoming netconsole packets by IP

Check the incoming packets' source IP address... if ncip isn't set to a
broadcast address, only listen to the client at ncip.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
This commit is contained in:
Joe Hershberger
2012-09-18 10:01:32 +00:00
parent e827fec2b2
commit 8a0eccb105
3 changed files with 9 additions and 3 deletions

View File

@@ -1161,6 +1161,7 @@ NetReceive(uchar *inpkt, int len)
#ifdef CONFIG_NETCONSOLE
nc_input_packet((uchar *)ip + IP_UDP_HDR_SIZE,
ntohl(ip->ip_src),
ntohs(ip->udp_dst),
ntohs(ip->udp_src),
ntohs(ip->udp_len) - UDP_HDR_SIZE);