diff --git a/net/ipforward/ipv6_forward.c b/net/ipforward/ipv6_forward.c index 382a40af1b..f59e88e5cf 100644 --- a/net/ipforward/ipv6_forward.c +++ b/net/ipforward/ipv6_forward.c @@ -348,6 +348,15 @@ static int ipv6_dev_forward(FAR struct net_driver_s *dev, #endif int ret; + /* If the interface isn't "up", we can't forward. */ + + if ((fwddev->d_flags & IFF_UP) == 0) + { + nwarn("WARNING: device is DOWN\n"); + ret = -EHOSTUNREACH; + goto errout; + } + /* Perform any necessary packet conversions. */ ret = ipv6_packet_conversion(dev, fwddev, ipv6);