Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
geonet: add ForwardingStopReason::Outside_Destination_Area
Trigger forwarding_stopped hook when forwarding_algorithm_selection by Router
stops forwarding because its own position is outside the destination area but the
sender is located within.

Change-Id: I1f12e9fb1f990f249e91081583bf3d9949c48724
  • Loading branch information
riebl committed Jul 11, 2019
1 parent 5f527c0 commit 213cc14
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions vanetza/geonet/router.cpp
Expand Up @@ -612,6 +612,7 @@ NextHop Router::forwarding_algorithm_selection(PendingPacketForwarding&& packet,
const LongPositionVector* pv_se = ll ? m_location_table.get_position(ll->sender) : nullptr;
if (pv_se && pv_se->position_accuracy_indicator && inside_or_at_border(destination, pv_se->position())) {
nh.discard();
forwarding_stopped(ForwardingStopReason::Outside_Destination_Area);
} else {
switch (m_mib.itsGnNonAreaForwardingAlgorithm) {
case UnicastForwarding::Unspecified:
Expand Down
3 changes: 2 additions & 1 deletion vanetza/geonet/router.hpp
Expand Up @@ -98,7 +98,8 @@ class Router
{
Hop_Limit,
Source_PDR,
Sender_PDR
Sender_PDR,
Outside_Destination_Area
};

Router(Runtime&, const MIB&);
Expand Down

0 comments on commit 213cc14

Please sign in to comment.