nic_router: fix missing IPv4.ECN initialization

We missed to zero-out the ECN field in IPv4 packets. We don't use the ECN
field but there might be old data left in the packet RAM allocated by the
NIC packet streams. If we don't zero-out ECN it might leak old data.

Issue #2732
This commit is contained in:
Martin Stein 2018-03-27 19:48:34 +02:00 committed by Christian Helmuth
parent 9c73326bbb
commit 4dc8f6dca4
2 changed files with 2 additions and 0 deletions

View File

@ -193,6 +193,7 @@ void Dhcp_client::_send(Message_type msg_type,
ip.header_length(sizeof(Ipv4_packet) / 4);
ip.version(4);
ip.diff_service(0);
ip.ecn(0);
ip.identification(0);
ip.flags(0);
ip.fragment_offset(0);

View File

@ -452,6 +452,7 @@ void Interface::_send_dhcp_reply(Dhcp_server const &dhcp_srv,
ip.header_length(sizeof(Ipv4_packet) / 4);
ip.version(4);
ip.diff_service(0);
ip.ecn(0);
ip.identification(0);
ip.flags(0);
ip.fragment_offset(0);