| commit | cc9b86c647fb85bf2bbf630d3422f9f5f09091ff | [log] [tgz] |
|---|---|---|
| author | Xiao Ma <xiaom@google.com> | Thu Oct 12 23:36:59 2023 +0900 |
| committer | Xiao Ma <xiaom@google.com> | Thu Oct 12 23:36:59 2023 +0900 |
| tree | 338046099f0b9ebcf61624288a93da1c13fd8142 | |
| parent | a1eb2e453f0b750a87f3b94368f6fa45080ae807 [diff] |
Add method to check if IA prefix option takes 0 lifetimes. Bug: 260934173 Test: TH Change-Id: If49a888198a52bf0cfefc125e0aa9636c1692279
diff --git a/staticlibs/device/com/android/net/module/util/structs/IaPrefixOption.java b/staticlibs/device/com/android/net/module/util/structs/IaPrefixOption.java index 176b7bc..e9c39e4 100644 --- a/staticlibs/device/com/android/net/module/util/structs/IaPrefixOption.java +++ b/staticlibs/device/com/android/net/module/util/structs/IaPrefixOption.java
@@ -108,6 +108,13 @@ } /** + * Check whether or not IA Prefix option has 0 preferred and valid lifetimes. + */ + public boolean withZeroLifetimes() { + return preferred == 0 && valid == 0; + } + + /** * Build an IA_PD prefix option with given specific parameters. */ public static ByteBuffer build(final short length, final long preferred, final long valid,