From 3e979321a5d96b9e2688f67ef0f936602c0f7e5a Mon Sep 17 00:00:00 2001 From: Lorenzo Colitti Date: Tue, 21 Apr 2015 15:22:17 +0900 Subject: Set the secs field in the BOOTP header. We mostly follow RFC 2131, which says that secs is the number of seconds "since client began address acquisition or renewal process", and thus set secs to zero on renew. This is different from our current behaviour, which keeps on counting without resetting secs to zero on renew. Bug: 19704592 Change-Id: Ifbb7644094c579be626ffb698eee87047425dbf0 --- services/tests/servicestests/src/android/net/dhcp/DhcpPacketTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'services/tests/servicestests/src') diff --git a/services/tests/servicestests/src/android/net/dhcp/DhcpPacketTest.java b/services/tests/servicestests/src/android/net/dhcp/DhcpPacketTest.java index 2658937..4f7c7ec 100644 --- a/services/tests/servicestests/src/android/net/dhcp/DhcpPacketTest.java +++ b/services/tests/servicestests/src/android/net/dhcp/DhcpPacketTest.java @@ -41,7 +41,8 @@ public class DhcpPacketTest extends TestCase { private byte[] mDomainBytes, mVendorInfoBytes; public TestDhcpPacket(byte type, byte[] domainBytes, byte[] vendorInfoBytes) { - super(0xdeadbeef, INADDR_ANY, CLIENT_ADDR, INADDR_ANY, INADDR_ANY, CLIENT_MAC, true); + super(0xdeadbeef, (short) 0, INADDR_ANY, CLIENT_ADDR, INADDR_ANY, INADDR_ANY, + CLIENT_MAC, true); mType = type; mDomainBytes = domainBytes; mVendorInfoBytes = vendorInfoBytes; -- cgit v1.1