diff options
Diffstat (limited to 'src/android/net/dhcp6/Dhcp6Packet.java')
-rw-r--r-- | src/android/net/dhcp6/Dhcp6Packet.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/android/net/dhcp6/Dhcp6Packet.java b/src/android/net/dhcp6/Dhcp6Packet.java index 53dd274d..ff7b036d 100644 --- a/src/android/net/dhcp6/Dhcp6Packet.java +++ b/src/android/net/dhcp6/Dhcp6Packet.java @@ -561,8 +561,6 @@ public class Dhcp6Packet { if (pd != null) { newPacket.mPrefixDelegation = pd; newPacket.mIaId = pd.iaid; - } else { - throw new ParseException("Missing IA_PD option"); } newPacket.mStatusCode = statusCode; newPacket.mRapidCommit = rapidCommit; @@ -600,8 +598,10 @@ public class Dhcp6Packet { Log.e(TAG, "Unexpected transaction ID " + mTransId + ", expected " + transId); return false; } - // mPrefixDelegation is guaranteed to be non-null. In decode() function, we throw the - // exception if IA_PD option doesn't exist. + if (mPrefixDelegation == null) { + Log.e(TAG, "DHCPv6 message without IA_PD option, ignoring"); + return false; + } if (!mPrefixDelegation.isValid()) { Log.e(TAG, "DHCPv6 message takes invalid IA_PD option, ignoring"); return false; |