Tethering: pass pmtu into Ipv6UpstreamRule()
Bug: 432676104 Test: TreeHugger, mm in p/m/C Flag: EXEMPT mainline/noop Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: I04e912604110f7b80ae31468b4f0a8938d127290
This commit is contained in:
parent
a697b2b8c8
commit
897600d37b
2 changed files with 8 additions and 5 deletions
|
|
@ -816,7 +816,7 @@ public class BpfCoordinator {
|
|||
for (final IpPrefix ipPrefix : newUpstreamPrefixes) {
|
||||
addIpv6UpstreamRule(ipServer, new Ipv6UpstreamRule(
|
||||
newUpstreamIfindex, interfaceParams.index, ipPrefix,
|
||||
interfaceParams.macAddr, NULL_MAC_ADDRESS, NULL_MAC_ADDRESS));
|
||||
interfaceParams.macAddr, NULL_MAC_ADDRESS, NULL_MAC_ADDRESS, 1400));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1692,7 +1692,7 @@ public class BpfCoordinator {
|
|||
// |field |oif |ethDst|ethSrc|ethPro|pmtu |
|
||||
// | | |mac |mac |to | |
|
||||
// +------+------+------+------+------+------+
|
||||
// |value |upstre|-- |-- |ETH_P_|1500 |
|
||||
// |value |upstre|-- |-- |ETH_P_|pmtu |
|
||||
// | |am | | |IP | |
|
||||
// +------+------+------+------+------+------+
|
||||
//
|
||||
|
|
@ -1706,16 +1706,19 @@ public class BpfCoordinator {
|
|||
public final MacAddress outSrcMac;
|
||||
@NonNull
|
||||
public final MacAddress outDstMac;
|
||||
public final int pmtu;
|
||||
|
||||
public Ipv6UpstreamRule(int upstreamIfindex, int downstreamIfindex,
|
||||
@NonNull IpPrefix sourcePrefix, @NonNull MacAddress inDstMac,
|
||||
@NonNull MacAddress outSrcMac, @NonNull MacAddress outDstMac) {
|
||||
@NonNull MacAddress outSrcMac, @NonNull MacAddress outDstMac,
|
||||
int pmtu) {
|
||||
this.upstreamIfindex = upstreamIfindex;
|
||||
this.downstreamIfindex = downstreamIfindex;
|
||||
this.sourcePrefix = sourcePrefix;
|
||||
this.inDstMac = inDstMac;
|
||||
this.outSrcMac = outSrcMac;
|
||||
this.outDstMac = outDstMac;
|
||||
this.pmtu = pmtu;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -1732,7 +1735,7 @@ public class BpfCoordinator {
|
|||
*/
|
||||
@NonNull
|
||||
public Tether6Value makeTether6Value() {
|
||||
return new Tether6Value(upstreamIfindex, outDstMac, outSrcMac, ETH_P_IPV6, 1400);
|
||||
return new Tether6Value(upstreamIfindex, outDstMac, outSrcMac, ETH_P_IPV6, pmtu);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -1229,7 +1229,7 @@ public class BpfCoordinatorTest {
|
|||
private static Ipv6UpstreamRule buildTestUpstreamRule(int upstreamIfindex,
|
||||
int downstreamIfindex, @NonNull IpPrefix sourcePrefix, @NonNull MacAddress inDstMac) {
|
||||
return new Ipv6UpstreamRule(upstreamIfindex, downstreamIfindex, sourcePrefix, inDstMac,
|
||||
MacAddress.ALL_ZEROS_ADDRESS, MacAddress.ALL_ZEROS_ADDRESS);
|
||||
MacAddress.ALL_ZEROS_ADDRESS, MacAddress.ALL_ZEROS_ADDRESS, 1400);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
|
|
|
|||
Loading…
Reference in a new issue