- /* Generate ICMP destination unreachable */
- netlink_icmp_simple(st,buf,client,ICMP_TYPE_UNREACHABLE,
- ICMP_CODE_NET_UNREACHABLE); /* client==NULL */
- BUF_FREE(buf);
+ if (best_quality>0) {
+ /* XXX Fragment if required */
+ st->routes[best_match]->deliver(
+ st->routes[best_match]->dst, buf);
+ st->routes[best_match]->outcount++;
+ BUF_ASSERT_FREE(buf);
+ } else {
+ /* Generate ICMP destination unreachable */
+ netlink_icmp_simple(st,buf,client,ICMP_TYPE_UNREACHABLE,
+ ICMP_CODE_NET_UNREACHABLE); /* client==NULL */
+ BUF_FREE(buf);
+ }