@@ -407,6 +407,7 @@ impl OutboundConnection {
407
407
intended_destination_service : Some ( ServiceDescription :: from ( & * target_service) ) ,
408
408
actual_destination,
409
409
upstream_sans,
410
+ final_sans : vec ! [ ] ,
410
411
} ) ;
411
412
}
412
413
// this was service addressed but we did not find a waypoint
@@ -437,6 +438,7 @@ impl OutboundConnection {
437
438
intended_destination_service : None ,
438
439
actual_destination : target,
439
440
upstream_sans : vec ! [ ] ,
441
+ final_sans : vec ! [ ] ,
440
442
} ) ;
441
443
} ;
442
444
@@ -470,6 +472,7 @@ impl OutboundConnection {
470
472
intended_destination_service : us. destination_service . clone ( ) ,
471
473
actual_destination,
472
474
upstream_sans,
475
+ final_sans : vec ! [ ] ,
473
476
} ) ;
474
477
}
475
478
// Workload doesn't have a waypoint; send directly
@@ -486,9 +489,12 @@ impl OutboundConnection {
486
489
Protocol :: HBONE | Protocol :: DOUBLEHBONE => Some ( us. workload_socket_addr ( ) ) ,
487
490
Protocol :: TCP => None ,
488
491
} ;
492
+ let ( upstream_sans, final_sans) = match us. workload . protocol {
493
+ Protocol :: DOUBLEHBONE => ( vec ! [ us. workload. identity( ) ] , us. service_sans ( ) ) ,
494
+ Protocol :: TCP | Protocol :: HBONE => ( us. workload_and_services_san ( ) , vec ! [ ] ) ,
495
+ } ;
489
496
490
497
// For case no waypoint for both side and direct to remote node proxy
491
- let upstream_sans = us. workload_and_services_san ( ) ;
492
498
debug ! ( "built request to workload" ) ;
493
499
Ok ( Request {
494
500
protocol : us. workload . protocol ,
@@ -498,6 +504,7 @@ impl OutboundConnection {
498
504
intended_destination_service : us. destination_service . clone ( ) ,
499
505
actual_destination,
500
506
upstream_sans,
507
+ final_sans,
501
508
} )
502
509
}
503
510
}
@@ -546,6 +553,11 @@ struct Request {
546
553
// The identity we will assert for the next hop; this may not be the same as actual_destination_workload
547
554
// in the case of proxies along the path.
548
555
upstream_sans : Vec < Identity > ,
556
+
557
+ // The identity of workload that will ultimately process this request.
558
+ // This field only matters if we need to know both the identity of the next hop, as well as the
559
+ // final hop (currently, this is only double HBONE).
560
+ final_sans : Vec < Identity > ,
549
561
}
550
562
551
563
#[ cfg( test) ]
0 commit comments